-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update fundamental libraries (Gradle, AGP, Kotlin) #31
Conversation
gradle/libs.versions.toml
Outdated
|
||
# https://kotlinlang.org/docs/releases.html#release-details | ||
kotlin = "1.4.31" | ||
kotlin = "1.9.10" |
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.
AGP 8.1 is using kotlin 1.8.20
https://android.googlesource.com/platform/tools/buildSrc/+/refs/tags/studio-2022.3.1/base/dependencies.properties#108
So, We should use same kotlin version with AGP.
kotlin = "1.9.10" | |
kotlin = "1.8.20" |
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.
Gradle 8.4 uses Kotlin 1.9.10 and it seems the gradle's version is used even if we specify 1.8.20 manually.
https://docs.gradle.org/8.4/release-notes.html
So I'll downgrade Gradle to 8.2.1 which uses Kotlin 1.8.20.
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.
Gradle 8.4 uses Kotlin 1.9.10
This means that Gradle 8.4 is using kotlin 1.9.10 to compiling kotlin dsl script
and gradle kotlin dsl library
.
And AGP 8.1 is using gradle tooling api 8.0 as minimum requirements of gradle version.
In our in-house cases, we try to use the latest toolchain.
But in the world of Github, not all devs use only the latest toolchain.
Therefore, to keep a reasonable user pool, it is recommended to use an slightly older version of Gradle.
In my opinion, Gradle 8.2.1 seems appropriate since it has been released for half a year.
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
Update fundamental libraries as following:
Gradle: 8.2.1 (Not 8.4 because it internally uses Kotlin 1.9.10)
AGP: 8.1.3
Kotlin: 1.8.20
In addition, fix to not use APIs that have been deprecated by the update.
Breaking changes
VersionNumber
api in Gradle becomes private, so use Semantic Versioning 2.0 for version text parsing and comparison.Note
Task.getProject()
in task phase is also deprecated, but I'll address it on another PR.