[TIMOB-28456] Android: Remove deprecated usage of jcenter() repo from gradle
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-05-28T12:35:08.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.0.1 |
Components | Android |
Labels | android, breaking-change, build, gradle |
Reporter | Joshua Quick |
Assignee | Joshua Quick |
Created | 2021-05-19T03:09:25.000+0000 |
Updated | 2021-07-06T19:32:00.000+0000 |
Description
*Summary:*
The
JCenter
repository has been deprecated and their plan is to shut it down by February 1, 2022.
https://developer.android.com/studio/build/jcenter-migration
This impacts Android gradle builds which fetch dependencies from this repository. A "build.gradle" script references this repo via the jcenter()
function.
*To-Do:*
Replace our usage of jcenter()
with mavenCentral()
here...
https://github.com/appcelerator/titanium_mobile/blob/master/android/build.gradle
https://github.com/appcelerator/titanium_mobile/blob/master/android/templates/build/root.build.gradle
*Breaking-Change:*
Changing our default templates from jcenter()
to mavenCentral()
might break module builds and hyperloop builds if the developer's "build.gradle" references a dependency that only exists in the deprecated jcenter()
repo. If this is the case, then they can restore the deprecated behavior by re-adding the repo to their "build.gradle" as shown below. Just note that this will eventually stop working by February 2022.
// build.gradle
repositories {
jcenter()
}
PR (master): https://github.com/appcelerator/titanium_mobile/pull/12821 PR (hyperloop-examples): https://github.com/appcelerator/hyperloop-examples/pull/89
merged to master, backport PR for 10_0_X in progress.
10_0_X PR merged