-
-
Notifications
You must be signed in to change notification settings - Fork 228
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 androidXVersion to prevent build fails #399
fix androidXVersion to prevent build fails #399
Conversation
android/build.gradle
Outdated
@@ -58,7 +58,7 @@ dependencies { | |||
implementation "com.android.support:support-annotations:$supportLibVersion" | |||
implementation "com.android.support:customtabs:$supportLibVersion" | |||
} else { | |||
def defaultAndroidXVersion = "1.+" | |||
def defaultAndroidXVersion = "1.5.+" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IgorVanian
I think you'll need to define separate defaults to do this since androidXAnnotation and androidXBrowser don't have the same stable version numbers.
The latest stable on androidx.browser is 1.4.0.
e.g.
def defaultAndroidXAnnotationVersion = "1.5.+"
def defaultAndroidXBrowserVersion = "1.4.+"
if (androidXVersion != null) {
defaultAndroidXAnnotationVersion = androidXVersion
defaultAndroidXBrowserVersion = androidXVersion
}
def androidXAnnotation = safeExtGet('androidXAnnotation', defaultAndroidXAnnotationVersion)
def androidXBrowser = safeExtGet('androidXBrowser', defaultAndroidXBrowserVersion)
NOTES:
Personally I don't think it should be trying to default them both to a shared androidXVersion
since androidx packages versions are independent of each other.
But removing that part would be a breaking change and require a major version bump so I left it in my snippet for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, there are separate versions in AndroidX for both. I don't see how this is a breaking change though? They are versions that were used until now anyway. What broke recently was actually a bump in AndroidX releases.
By the way, I don't even understand why should we be able to set a specific version for something that is required by the lib. If there are version differences in dependencies, Gradle will resolve the conflict by using the latest one anyway. We could just set the minimum required version in the library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was saying that - long term this part should go away
if (androidXVersion != null) {
defaultAndroidXAnnotationVersion = androidXVersion
defaultAndroidXBrowserVersion = androidXVersion
}
BUT removing that part specifically would be a breaking change because if someone currently using the library has that set and we start ignoring it would change the behavior they experience.
Hi. Any plans for merging this commit? A new androidX version 1.6 is out and started to cause problems with SDK 33 now. I patched it on my project and seems to be working just fine on RN 0.71.7. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for your contribution! <3
Awesome, @jdnichollsc and @IgorVanian |
@jenskuhrjorgensen I'm waiting for merging this PR in order to publish a new release #421 |
@jdnichollsc Can we get a release containing this PR? It looks like the other PR died somewhere along the way. |
Hi, @jdnichollsc when can we expect a new release containing this PR? |
Hi @jdnichollsc, when will the new version containing the fix be released? |
PR Checklist
What is the current behavior?
The investigation is available here: #398
This exact problem was already addressed multiple times and we still get surprised by failing builds (#298, #386 ). I think it's worth to set a fixed version to prevent this kind of surprise in the future. 🙏
What is the new behavior?
Fixes androidXVersion to 1.5.+ which is the latest before the kotlin 1.8.0 issue...
Fixes/Implements/Closes #398.