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 (#41175)

Summary:
Pull Request resolved: #41175

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

ignored-github-export-checks
bypass-github-export-checks

Reviewed By: mdvacca

Differential Revision: D50600815

fbshipit-source-id: f429c2ae9d7204e4aa2cb29357983c0dc3a1aab6
  • Loading branch information
cortinico authored and facebook-github-bot committed Oct 26, 2023
1 parent 3d1d2f5 commit 1a7a677
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 1a7a677

Please sign in to comment.