You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix builds to not probe Maven for 1000.0.0 versioned artifacts (#58425)
Summary:
Fixes issue with probing Maven Central repo for artifacts with version `1000.0.0` which are not stored there. The reason is that it creates most of the traffic on Maven Mirror that is forwarded to Maven Central due to artifacts not being cached because they are not found. After this change:
- Gradle retains its existing dependency substitutions and forced versions.
- Local file-based Maven repositories may still provide 1000.0.0 artifacts.
- CocoaPods continues falling back to building React Native from source.
- SwiftPM retains its existing 1000.0.0 → nightly resolution behavior.
- Published React Native and Hermes versions continue to be queried normally.
## Changelog:
[GENERAL][FIXED] - Changed builds to not probe Maven for `1000.0.0` versioned artifacts.
Pull Request resolved: #58425
Test Plan:
Ran `pod install` and build the HelloWorld workspace:
```
[MavenProbe] SKIP https://repo.reactnative.dev/maven2/.../1000.0.0/...reactnative-dependencies-debug.tar.gz
[MavenProbe] SKIP https://repo1.maven.org/maven2/.../1000.0.0/...reactnative-dependencies-debug.tar.gz
[ReactNativeDependencies] No prebuilt artifacts found, reverting to building from source.
[MavenProbe] SKIP https://repo.reactnative.dev/maven2/.../1000.0.0/...reactnative-core-debug.tar.gz
[MavenProbe] SKIP https://repo1.maven.org/maven2/.../1000.0.0/...reactnative-core-debug.tar.gz
[ReactNativeCore] No prebuilt artifacts found, reverting to building from source.
Pod installation complete! There are 85 dependencies from the Podfile and 84 total pods installed.
```
Ran SwiftPM setup on a disposable copy of HelloWorld and built the generated Xcode project.
```
[setup-apple-spm] React Native version: 1000.0.0
[download-spm-artifacts] Detected dev version (1000.0.0), resolving as nightly...
[download-spm-artifacts] Resolved nightly: 0.89.0-nightly-20260909-b830082cf
[MavenProbe] HEAD https://repo.reactnative.dev/maven2/.../0.89.0-nightly-20260909-b830082cf/...reactnative-core-debug.tar.gz
[MavenProbe] HEAD https://repo.reactnative.dev/maven2/.../0.89.0-nightly-20260909-b830082cf/...reactnative-dependencies-debug.tar.gz
```
Published `react-android:1000.0.0` to `/tmp/maven-local`, then ran the repository’s real HelloWorld Android build and a verbose Gradle rebuild.
```
[MavenProbe] SKIP remote Maven https://repo.reactnative.dev/maven2 for React Native 1000.0.0
[MavenProbe] SKIP remote Maven https://repo.maven.apache.org/maven2/ for React Native 1000.0.0
```
During the HelloWorld build:
```
[MavenProbe] SKIP remote Maven https://repo.maven.apache.org/maven2/ for React Native 1000.0.0
[MavenProbe] SKIP remote Maven https://dl.google.com/dl/android/maven2/ for React Native 1000.0.0
[MavenProbe] SKIP remote Maven https://www.jitpack.io for React Native 1000.0.0
BUILD SUCCESSFUL in 5s
```
Reviewed By: cipolleschi
Differential Revision: D119646843
Pulled By: coado
fbshipit-source-id: 66d1d36e8f00d9cb8beaac76aae720c1cbb079db
Copy file name to clipboardExpand all lines: packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/DependencyUtils.kt
Copy file name to clipboardExpand all lines: packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/utils/DependencyUtilsTest.kt
0 commit comments