Skip to content

Commit 2f8e52b

Browse files
cortinicofacebook-github-bot
authored andcommitted
Restrict mavenCentral to exclude react-native older packages
Summary: This Diff is restricting the scope of `mavenCentral` to do not include react-native packages. This will make us sure we don't pickup older versions of react-native. This specifically is a problem if you're building on a nightly as the version of RN nightly is `0.0.0.xxx` which is lower than then version on maven central. More on this here #32326 (comment) Changelog: [Internal] [Changed] - Restrict mavenCentral to exclude react-native older packages Reviewed By: ShikaSD Differential Revision: D31571803 fbshipit-source-id: d7ce7e82825cbebda2e4e534565d7ab15dba2624
1 parent 4790146 commit 2f8e52b

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

build.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ allprojects {
3131
url = uri("$rootDir/node_modules/detox/Detox-android")
3232
}
3333
google()
34-
mavenCentral()
34+
mavenCentral {
35+
// We don't want to fetch react-native from Maven Central as there are
36+
// older versions over there.
37+
content {
38+
excludeGroup("com.facebook.react")
39+
}
40+
}
3541
}
3642

3743
// used to override ndk path/version from env variables on CI

template/android/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ allprojects {
2929
// Android JSC is installed from npm
3030
url("$rootDir/../node_modules/jsc-android/dist")
3131
}
32-
mavenCentral()
32+
mavenCentral {
33+
// We don't want to fetch react-native from Maven Central as there are
34+
// older versions over there.
35+
content {
36+
excludeGroup "com.facebook.react"
37+
}
38+
}
3339
google()
3440
maven { url 'https://www.jitpack.io' }
3541
}

0 commit comments

Comments
 (0)