Skip to content

Commit 51e0408

Browse files
add mavenCentral as priority for repos than jcenter
JCenter has been offline often and it is causing pipeline issues when trying to download the poms/jars. Since JCenter also serves as a mirror for Maven Central, and any dependencies available on Maven Central are also available on JCenter, it is better to rely on Maven Central since Gradle team is discouraging the use of JCenter since it became read-only.
1 parent 8e8a850 commit 51e0408

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

android/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ buildscript {
1010
if (project == rootProject) {
1111
repositories {
1212
google()
13+
mavenCentral()
14+
// JCenter is going read-only repository indefinitely
15+
// Gradle is discouraging jcenter to avoid to avoid build issues - pipeline
16+
// ref: https://blog.gradle.org/jcenter-shutdown
1317
jcenter()
1418
}
1519

@@ -38,8 +42,8 @@ android {
3842

3943
repositories {
4044
google()
41-
jcenter()
4245
mavenCentral()
46+
jcenter()
4347
}
4448

4549
dependencies {

0 commit comments

Comments
 (0)