Skip to content

Commit

Permalink
Do not attempt to query Maven Central if project has react.internal.m…
Browse files Browse the repository at this point in the history
…avenLocalRepo (facebook#41175)

Summary:

This will make sure that if you specify a maven local folder with `react.internal.mavenLocalRepo`
you're not attempting to fetch artifacts from Maven Central.

Changelog:
[Internal] [Changed] - Do not attempt to query Maven Central if project has react.internal.mavenLocalRepo

Reviewed By: mdvacca

Differential Revision: D50600815
  • Loading branch information
cortinico authored and facebook-github-bot committed Oct 25, 2023
1 parent 8809392 commit 5adafdf
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ internal object DependencyUtils {
repositories.mavenCentral { repo ->
// We don't want to fetch JSC from Maven Central as there are older versions there.
repo.content { it.excludeModule("org.webkit", "android-jsc") }

// If the user provided a react.internal.mavenLocalRepo, do not attempt to load
// anything from Maven Central that is react related.
if (hasProperty(INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO)) {
repo.content { it.excludeGroup("com.facebook.react") }
}
}
// Android JSC is installed from npm
mavenRepoFromURI(File(reactNativeDir, "../jsc-android/dist").toURI())
Expand Down

0 comments on commit 5adafdf

Please sign in to comment.