Skip to content
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

fix(android, build): remove jcenter / use modern versions #30

Merged
merged 2 commits into from Nov 15, 2021

Conversation

mikehardy
Copy link
Contributor

Hi there!

This is the version of the build.gradle that I'm using via patch-package in my project, thought it would be good to make a PR for everyone

Fixes #29 - removes jcenter

@LinusU
Copy link
Owner

LinusU commented Nov 4, 2021

Awesome, thank you for this!

I see that this bumps e.g. targetSdkVersion, does this make it a breaking change, or should it be cool since that is just the fallback?

Android gradle plugin of 7.0.3 requires a minimum gradle of 7 which it turns out many don't have
If you do have gradle 7 though, you may have a compatibility issue with Java 8
Sticking to gradle plugin 4 for a bit, and compile version 30 (rapidly becoming most common) should
yield maximum compatibility
@mikehardy
Copy link
Contributor Author

mikehardy commented Nov 11, 2021

Hey @LinusU ! Sorry for the delay I missed this notification. You ask a great question
My original thinking was that these versions were safe - even if they are fallback they should be safe
But then while working with release testers group in react-native it turns out that moving to android gradle plugin 7 requires gradle 7 (which many may not have moved to, so that is a break) and further if you move to gradle plugin 7 / gradle 7 you may have compile issues until you move to Java 11, which many may not have done yet so that is a break.

Good times facebook/react-native#32540 (comment)

To make sure that compile target of 31 doesn't affect anyone (though I think it is fine?) and since the module isn't using symbols from 31 I left that at 30 as well in the followon commit just to be sure

TL;DR: - I backed this off to gradle plugin version 4.2.2 / api 30 which is the current react-native template default and should be compatible with the vast majority of currently installed toolchains out there

@LinusU LinusU merged commit eb101ad into LinusU:master Nov 15, 2021
@LinusU
Copy link
Owner

LinusU commented Nov 15, 2021

Thank you ❤️

Published as 🚢 1.7.1 / 2021-11-15

@mikehardy mikehardy deleted the patch-1 branch November 15, 2021 16:16
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.

Android: jCenter deprecation > publish on mavenCentral
2 participants