Page MenuHomePhabricator

[Gradle] Replace `jcenter()` with `gradlePluginPortal()`
ClosedPublic

Authored by atul on Oct 31 2022, 8:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 12:32 AM
Unknown Object (File)
Wed, Oct 30, 2:52 AM
Unknown Object (File)
Wed, Oct 30, 2:52 AM
Unknown Object (File)
Wed, Oct 30, 2:52 AM
Unknown Object (File)
Wed, Oct 30, 2:52 AM
Unknown Object (File)
Wed, Oct 30, 2:52 AM
Unknown Object (File)
Wed, Oct 30, 2:52 AM
Unknown Object (File)
Wed, Oct 30, 2:52 AM
Subscribers

Details

Summary

We're having issues with jCenter being down/unavailable (see: https://status.gradle.com/incidents/c65zmfw32lpm) which affects at least react-native-video and react-native-ffmpeg.

In this diff we:
A. Replace jcenter() with gradlePluginPortal() (which is a jCenter mirror provided by Gradle) in native/android/build.gradle. This resolves issues with react-native-video.
B. Patch react-native-ffmpeg to replace jcenter() with gradlePluginPortal() in order to properly resolve transitive dependencies of react-native-ffmpeg.

Test Plan

CI and tested locally

Diff Detail

Repository
rCOMM Comm
Branch
fix-android (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 31 2022, 8:06 AM
Harbormaster failed remote builds in B13103: Diff 17989!

try removing jCenter altogether (not positive how allprojects.repositories decides how to resolve dependencies, but i think jcenter might have higher priority than jitpack... causing issues with non react-native-video dependencies)

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 31 2022, 8:32 AM
Harbormaster failed remote builds in B13104: Diff 17990!

add gradlePluginPortal() (Gradle's JCenter mirror)

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 31 2022, 8:43 AM
Harbormaster failed remote builds in B13105: Diff 17991!

reposition, revert dep change, trigger ci

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 31 2022, 9:18 AM
Harbormaster failed remote builds in B13106: Diff 17992!

./gradlew clean

the logs mentioned jcenter bintray even though there are no longer any occurences of "jcenter" or "bintray" in the codebase... things also worked locally on my mac so maybe there's some build artifacts laying around

Harbormaster returned this revision to the author for changes because remote builds failed.Oct 31 2022, 9:32 AM
Harbormaster failed remote builds in B13107: Diff 17993!

try patching react-native-ffmpeg to use gradlePluginPortal() instead of jcenter

atul requested review of this revision.Oct 31 2022, 9:51 AM
This revision is now accepted and ready to land.Oct 31 2022, 10:05 AM
atul retitled this revision from [yarn] Bump `react-native-video` to [Gradle] Replace `jcenter()` with `gradlePluginPortal()`.Oct 31 2022, 10:16 AM
atul edited the summary of this revision. (Show Details)
atul edited the test plan for this revision. (Show Details)
NOTE: This diff is no longer about bumping react-native-video as the original title implied. Instead we're replacing jcenter() with gradlePluginPortal() so dependencies can be properly resolved as-is. Updating the diff summary to reflect this.