Skip to content

remove jcenter - #31609

Closed
dulmandakh wants to merge 5 commits into
react:masterfrom
dulmandakh:remove-jcenter
Closed

remove jcenter#31609
dulmandakh wants to merge 5 commits into
react:masterfrom
dulmandakh:remove-jcenter

Conversation

@dulmandakh

@dulmandakhdulmandakh commented May 27, 2021

Copy link
Copy Markdown
Contributor

Summary

jcenter is read-only now, and newer versions of dependencies will be published to either MavenCentral or Jitpack. This PR removes jcenter to avoid future issues, then uses MavenCentral and Jitpack as replacement. Current flipper depends on Stetho version that is not available on MavenCentral, so had to exclude and bump the version.

Both Gradle and Buck successfully download all the dependencies.

Changelog

[Android] [Changed] - Remove jcenter

Test Plan

rn-tester builds and runs as expected.

@facebook-github-botfacebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. labels May 27, 2021
@dulmandakh

dulmandakh commented May 27, 2021

Copy link
Copy Markdown
ContributorAuthor

@mdvacca Please review and merge. Failing tests due to Path is not a file error will be fixed with #31593

@analysis-bot

analysis-bot commented May 27, 2021

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
ios-universaln/a--

Base commit: 78caaca

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@ShikaSD has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ShikaSD

Copy link
Copy Markdown
Contributor

Hey, thanks for updating this!

then uses MavenCentral and Jitpack as replacement

Do you know which dependencies are available only on Jitpack?

@dulmandakh

Copy link
Copy Markdown
ContributorAuthor

@ShikaSD i don't remember, there was a few. Most dependencies moved to MavenCentral, but i thought that having jitpack would ease migration for developers.

@dulmandakh

Copy link
Copy Markdown
ContributorAuthor

@ShikaSD removed jitpack from buck.

@analysis-bot

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a9,239,992+0
androidhermesarmeabi-v7a8,749,684+0
androidhermesx869,702,602+0
androidhermesx86_649,667,479+0
androidjscarm64-v8a10,885,297+0
androidjscarmeabi-v7a9,786,263+0
androidjscx8610,943,305+0
androidjscx86_6411,549,705+0

Base commit: 2f477b1

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@ShikaSD has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Comment threadbuild.gradle.kts
includeModule("com.facebook.yoga", "proguard-annotations")
includeModule("com.facebook.fresco", "stetho")
}
maven {

@ShikaSDShikaSDJun 2, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I believe we also don't need jitpack here
Only FB specific deps are remaining according to the list above, and they should be available on Maven Central

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I can remove it but tomorrow

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@ShikaSD merged this pull request in 70da640.

@facebook-github-botfacebook-github-bot added the Merged This PR has been merged. label Jun 2, 2021
Titozzz pushed a commit to Titozzz/react-native that referenced this pull request Jun 7, 2021
Summary:
jcenter is read-only now, and newer versions of dependencies will be published to either MavenCentral or Jitpack. This PR removes jcenter to avoid future issues, then uses MavenCentral and Jitpack as replacement. Current flipper depends on Stetho version that is not available on MavenCentral, so had to exclude and bump the version.
Both Gradle and Buck successfully download all the dependencies.
[Android] [Changed] - Remove jcenter
Pull Request resolved: react#31609
Test Plan: rn-tester builds and runs as expected.
Reviewed By: mdvacca
Differential Revision: D28802444
Pulled By: ShikaSD
fbshipit-source-id: 043ef079d0cda77a1f8dd732678452ed712741a4
Titozzz pushed a commit to Titozzz/react-native that referenced this pull request Jun 7, 2021
Summary:
jcenter is read-only now, and newer versions of dependencies will be published to either MavenCentral or Jitpack. This PR removes jcenter to avoid future issues, then uses MavenCentral and Jitpack as replacement. Current flipper depends on Stetho version that is not available on MavenCentral, so had to exclude and bump the version.
Both Gradle and Buck successfully download all the dependencies.
[Android] [Changed] - Remove jcenter
Pull Request resolved: react#31609
Test Plan: rn-tester builds and runs as expected.
Reviewed By: mdvacca
Differential Revision: D28802444
Pulled By: ShikaSD
fbshipit-source-id: 043ef079d0cda77a1f8dd732678452ed712741a4
tido64 pushed a commit that referenced this pull request Jun 8, 2021
Summary:
jcenter is read-only now, and newer versions of dependencies will be published to either MavenCentral or Jitpack. This PR removes jcenter to avoid future issues, then uses MavenCentral and Jitpack as replacement. Current flipper depends on Stetho version that is not available on MavenCentral, so had to exclude and bump the version.
Both Gradle and Buck successfully download all the dependencies.
## Changelog
[Android] [Changed] - Remove jcenter
Pull Request resolved: #31609
Test Plan: rn-tester builds and runs as expected.
Reviewed By: mdvacca
Differential Revision: D28802444
Pulled By: ShikaSD
fbshipit-source-id: 043ef079d0cda77a1f8dd732678452ed712741a4
Setito pushed a commit to Setito/react-native that referenced this pull request Jul 17, 2021
Summary:
jcenter is read-only now, and newer versions of dependencies will be published to either MavenCentral or Jitpack. This PR removes jcenter to avoid future issues, then uses MavenCentral and Jitpack as replacement. Current flipper depends on Stetho version that is not available on MavenCentral, so had to exclude and bump the version.
Both Gradle and Buck successfully download all the dependencies.
## Changelog
[Android] [Changed] - Remove jcenter
Pull Request resolved: react#31609
Test Plan: rn-tester builds and runs as expected.
Reviewed By: mdvacca
Differential Revision: D28802444
Pulled By: ShikaSD
fbshipit-source-id: 043ef079d0cda77a1f8dd732678452ed712741a4
pullBot pushed a commit to TheRakeshPurohit/react-native that referenced this pull request Oct 5, 2021
Summary:
In react#31609, the deprecated `jcenter()` was replaced with `mavenCentral()`. In the template build.gradle, it _also changed the order of repos_. I am not sure if this was done intentionally or not (dulmandakh please confirm). Instead of appearing right _after_ `google()`, `mavenCentral()` was put **first** in the list, even before the local repos (that, for example, contain the `react-native` artifacts fetched by npm). Now, under normal circumstance, this _might_ not cause issues because of latency, but there is chance that Gradle could resolve incorrect versions (or at least look in the wrong repo first). The last version of `react-native` published to the public repo was [`0.20.1`](https://mvnrepository.com/artifact/com.facebook.react/react-native/0.20.1), uploaded in February 2016!
This PR changes the order of `mavenCentral()` so that is consistent with both the repo's current [root level build.gradle](https://github.com/facebook/react-native/blob/main/build.gradle.kts#L34), as well as other default Android templates. Putting the local repos first will ensure they have the highest priority when looking for artifacts. `react-native` should _always_ come from the locally downloaded `node_modules/` folder, not from a remote repo.
## Changelog
[Android] [Changed] - Move mavenCentral repo below local paths
Pull Request resolved: react#32326
Test Plan: Create new app from template, ensure local repos appear before remote repos; `react-native` resolves to correct version.
Reviewed By: yungsters
Differential Revision: D31375678
Pulled By: cortinico
fbshipit-source-id: e47737262b4eebb06e22a955cacd6114059bb2f4
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.ContributorA React Native contributor.MergedThis PR has been merged.Needs: React Native Team Attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@dulmandakh@analysis-bot@facebook-github-bot@ShikaSD@elicwhite