-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: bump kotlin 1.9.24 & drop kotlin-android-extensions when kotlin >= 1.8.0 #1543
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1543 +/- ##
=======================================
Coverage 72.50% 72.50%
=======================================
Files 23 23
Lines 1837 1837
=======================================
Hits 1332 1332
Misses 505 505 ☔ View full report in Codecov by Sentry. |
Kotlin has a compatibility guide at https://kotlinlang.org/docs/compatibility-guide-18.html It seems like they don't follow the "semver" rules and breaking changes may be introduced in "minor" versions. As an example, some things changed with the
There's a lot there, so given this information, if the Android SDK was built with compatibility of a specific kotlin version, we should try to follow that as our default as much as possible. |
Not sure how much this is relevant but there is also a Jetpack Compose Compiler package that does have explicit compatibility notes regarding kotlin https://developer.android.com/jetpack/androidx/releases/compose-kotlin For example, their latest release v1.4.0 introduces support for Kotlin 1.8.0. |
As a data point I recently had to upgrade my kotlin version to 1.7 because our builds started failing with a version mismatch issue. Trying to use 1.8 failed to build, with the error:
For context, to change you kotlin version set |
I ran in to this build error today Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1. Really frustrating when these errors appear for no apparent reason. The kotlin fix above worked so it was atleast an easy fix, when I eventually found it here. I wonder if this fix will cause a new problem down the road when 1.7.22 isnt compatible with something else |
I found another compatibility matrix in regards to gradle: https://docs.gradle.org/current/userguide/compatibility.html As it stands right now, kotlin 1.8 is only officially supported on Gradle 8, which we aren't using yet (because it will require AGP 8). I know folks already stated compatibility issues with kotlin 1.8, this is just a data point that might explain why there are compatibility issues. |
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.
Looks good, but I think this PR might be blocked by #1678
Because that PR bumps Gradle to 8.7 which I think is a requirement for >= kotlin 1.9.22.
Motivation and Context
Use latest Kotlin
resolves #1692
resolves #1661 (Kotlin)
resolves #1642
Description
1.9.24
kotlin-android-extensions
plugin when Kotlin version is>= 1.8.0
Default projects do not enable Kotlin. If Kotlin is enabled, with the config
preference
GradlePluginKotlinEnabled
, the default version1.9.24
is applied.App developers can change the Kotlin version with the following config
preference
GradlePluginKotlinVersion
.Example:
kotlin-android-extensions
plugin is applied to maintain previous implementation.kotlin-android-extensions
plugin is not applied as it was deprecated.Kotlin Release Notes
Kotlin's Release says:
Testing
npm t
GradlePluginKotlinVersion
to1.7.22
to test ensurekotlin-android-extensions
is applied.Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)