Skip to content

chore(jcenter): remove usage of jcenter() #697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 5, 2021

Conversation

Bibazavr
Copy link
Contributor

@tido64 said:

Unfortunately, we cannot remove JCenter without breaking people on older versions of React Native:

I disagree with it and I will proof soon:)

Refs: #610, #680, #681, #666, #611

Summary

I was read some treads in this repo and saw the wrong conclusion:c

I guess @tido64 gets error because in this repo use react-native-test-app for example

react-native-test-app dont have jcenter() into build.gradle

But old react-native project have jcenter() inside build.gradle and all works fine. Proof

with new RN all work's fine too:3

Test Plan

go to Proof and check up - all works fine:o

@tido64 said:
> Unfortunately, we cannot remove JCenter without breaking people on older versions of React Native:

I disagree with it and I will proof soon

Refs: react-native-async-storage#610, react-native-async-storage#680, react-native-async-storage#681, react-native-async-storage#666, react-native-async-storage#611
@tido64
Copy link
Member

tido64 commented Oct 22, 2021

Thanks for creating the minimal repro. It was very helpful! I had a closer look at this and you're right. Still, to make the CI go green, I think you also need to do:

diff --git a/example/android/build.gradle b/example/android/build.gradle
index a03ce97..f8c2cb5 100644
--- a/example/android/build.gradle
+++ b/example/android/build.gradle
@@ -53,6 +53,9 @@ allprojects {
         maven {
             url("$rootDir/../../node_modules/detox/Detox-android")
         }
+        google()
+        mavenCentral()
+        jcenter()
     }
     afterEvaluate { project ->
         def androidExtension = project.extensions.findByName('android')

If we can get the CI green, I'll be happy to merge this.

Edit: We should also remove mavenLocal().

@krizzu
Copy link
Member

krizzu commented Oct 24, 2021

@Bibazavr Thanks for bringing this up. I think that we're fine with removing jcenter from our direct repos block, but still need to keep it in example/build.gradle, like @tido64 said.

@Bibazavr
Copy link
Contributor Author

Bibazavr commented Oct 29, 2021

sorry for gone - come deadlines for my main job :D

I was try add jcenter in example/build.gradle but it's not help's:c

I never work with react-native-test-app before... But it's looks like for this library dosen't matter what I add into example/build.gradle

Edit: CI pass but my local build gets crash

> Task :generateDebugRFile FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1/userguide/command_line_interface.html#sec:command_line_warnings
6 actionable tasks: 1 executed, 5 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':generateDebugRFile'.
> Could not resolve all files for configuration ':debugCompileClasspath'.
   > Could not find com.facebook.yoga:proguard-annotations:1.14.1.
     Required by:
         project : > com.facebook.react:react-native:0.63.4
   > Could not find com.facebook.fbjni:fbjni-java-only:0.0.3.
     Required by:
         project : > com.facebook.react:react-native:0.63.4

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 874ms

Error: Command failed: ./gradlew installDebug -PreactNativeDevServerPort=8081

And i don't have any idea why

@tido64
Copy link
Member

tido64 commented Oct 29, 2021

Edit: CI pass but my local build gets crash

Yeah, this sounds like a caching issue. Have you tried cleaning/invalidating everything and rebuild the project? It works locally on my machine, that's why I suggested it. 😄

Thanks for making this contribution ❤️

Edit: I'm going to hold off merging this until you can verify that it builds successfully on your end as well.

@krizzu
Copy link
Member

krizzu commented Nov 4, 2021

hey @Bibazavr , how does the build look like on your side?

@Bibazavr
Copy link
Contributor Author

Bibazavr commented Nov 5, 2021

Yeah, this sounds like a caching issue.

@tido64, It true. I was try on my home PC - everything fine:)

hey @Bibazavr , how does the build look like on your side?

All fine:3

I guess you can accept this merge request:o

(sorry for I was gone long)

@krizzu krizzu merged commit 0ec517c into react-native-async-storage:master Nov 5, 2021
@krizzu
Copy link
Member

krizzu commented Nov 5, 2021

Thanks!

@krizzu
Copy link
Member

krizzu commented Nov 24, 2021

🎉 This PR is included in version 1.15.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants