diff --git a/build.gradle.kts b/build.gradle.kts index 4318c6d00e6598..dbe8e69b2d615b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -31,7 +31,13 @@ allprojects { url = uri("$rootDir/node_modules/detox/Detox-android") } google() - mavenCentral() + mavenCentral { + // We don't want to fetch react-native from Maven Central as there are + // older versions over there. + content { + excludeGroup("com.facebook.react") + } + } } // used to override ndk path/version from env variables on CI diff --git a/template/android/build.gradle b/template/android/build.gradle index db796539cefccb..3be1031fb223dd 100644 --- a/template/android/build.gradle +++ b/template/android/build.gradle @@ -29,7 +29,13 @@ allprojects { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") } - mavenCentral() + mavenCentral { + // We don't want to fetch react-native from Maven Central as there are + // older versions over there. + content { + excludeGroup "com.facebook.react" + } + } google() maven { url 'https://www.jitpack.io' } }