Summary:
jcenter is read-only now, and newer versions of dependencies will be published to either MavenCentral or Jitpack. This PR removes jcenter to avoid future issues, then uses MavenCentral and Jitpack as replacement. Current flipper depends on Stetho version that is not available on MavenCentral, so had to exclude and bump the version.

Both Gradle and Buck successfully download all the dependencies.

## Changelog

[Android] [Changed] - Remove jcenter

Pull Request resolved: https://github.com/facebook/react-native/pull/31609

Test Plan: rn-tester builds and runs as expected.

Reviewed By: mdvacca

Differential Revision: D28802444

Pulled By: ShikaSD

fbshipit-source-id: 043ef079d0cda77a1f8dd732678452ed712741a4
This commit is contained in:
Dulmandakh 2021-06-02 09:56:08 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 249435c4d5
Коммит 70da640946
11 изменённых файлов: 14 добавлений и 34 удалений

Просмотреть файл

@ -8,7 +8,6 @@
[maven_repositories]
central = https://repo1.maven.org/maven2
google = https://maven.google.com/
jcenter = https://jcenter.bintray.com/
[alias]
rntester = //packages/rn-tester/android/app:app

Просмотреть файл

@ -13,6 +13,9 @@ indent_size = 2
[*.gradle]
indent_size = 4
[*.kts]
indent_size = 4
[BUCK]
indent_size = 4

Просмотреть файл

@ -484,7 +484,7 @@ android {
dependencies {
api("com.facebook.infer.annotation:infer-annotation:0.11.2")
api("com.facebook.yoga:proguard-annotations:1.17.0")
api("com.facebook.yoga:proguard-annotations:1.19.0")
api("javax.inject:javax.inject:1")
api("androidx.appcompat:appcompat:1.0.2")
api("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")

Просмотреть файл

@ -9,8 +9,8 @@ rn_prebuilt_jar(
fb_native.remote_file(
name = "annotations-binary.jar",
sha1 = "95ff77fd4870136a0454dd7ccad8813db87bd9ab",
url = "https://jcenter.bintray.com/com/facebook/yoga/proguard-annotations/1.17.0/proguard-annotations-1.17.0.jar",
sha1 = "fcbbb39052e6490eaaf6a6959c49c3a4fbe87c63",
url = "mvn:com.facebook.yoga:proguard-annotations:jar:1.19.0",
)
rn_android_library(

Просмотреть файл

@ -10,11 +10,6 @@ buildscript {
mavenLocal()
google()
mavenCentral()
jcenter {
content {
includeModule("org.jetbrains.trove4j", "trove4j")
}
}
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.1")
@ -38,16 +33,10 @@ allprojects {
mavenLocal()
google()
mavenCentral()
jcenter {
content {
includeModule("com.facebook.yoga", "proguard-annotations")
includeModule("com.facebook.fresco", "stetho")
}
}
}
// used to override ndk path on CI
if (System.getenv("LOCAL_ANDROID_NDK_VERSION") != null) {
setProperty("ANDROID_NDK_VERSION", System.getenv("LOCAL_ANDROID_NDK_VERSION"))
setProperty("ANDROID_NDK_VERSION", System.getenv("LOCAL_ANDROID_NDK_VERSION"))
}
}

Просмотреть файл

@ -12,11 +12,6 @@ buildscript {
mavenLocal()
google()
mavenCentral()
jcenter {
content {
includeGroup("org.jetbrains.trove4j")
}
}
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.1")
@ -28,11 +23,6 @@ allprojects {
mavenLocal()
google()
mavenCentral()
jcenter {
content {
includeGroup("org.jetbrains.trove4j")
}
}
}
}

Просмотреть файл

@ -10,10 +10,5 @@ allprojects {
mavenLocal()
google()
mavenCentral()
jcenter {
content {
includeGroup("org.jetbrains.trove4j")
}
}
}
}

Просмотреть файл

@ -13,7 +13,7 @@ plugins {
repositories {
google()
jcenter()
mavenCentral()
}
gradlePlugin {

Просмотреть файл

@ -213,6 +213,7 @@ dependencies {
hermesDebugImplementation files(hermesPath + "hermes-debug.aar")
hermesReleaseImplementation files(hermesPath + "hermes-release.aar")
debugImplementation("com.facebook.fresco:stetho:2.3.0")
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
@ -223,6 +224,7 @@ dependencies {
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
exclude group:'com.facebook.fresco', module:'stetho'
}
if (useIntlJsc) {

Просмотреть файл

@ -185,6 +185,7 @@ dependencies {
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.fresco:stetho:2.3.0")
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
@ -196,6 +197,7 @@ dependencies {
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
exclude group:'com.facebook.fresco', module:'stetho'
}
if (enableHermes) {

Просмотреть файл

@ -10,7 +10,7 @@ buildscript {
}
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.1")
@ -21,6 +21,7 @@ buildscript {
allprojects {
repositories {
mavenCentral()
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
@ -32,7 +33,6 @@ allprojects {
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}