Skip to content

Commit

Permalink
Restrict mavenCentral to exclude react-native older packages
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cortinico authored and facebook-github-bot committed Oct 13, 2021
1 parent 4790146 commit 2f8e52b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion build.gradle.kts
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion template/android/build.gradle
Expand Up @@ -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' }
}
Expand Down

0 comments on commit 2f8e52b

Please sign in to comment.