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

Update fundamental libraries (Gradle, AGP, Kotlin) #31

Merged
merged 10 commits into from
Nov 20, 2023

Conversation

r-ralph
Copy link
Member

@r-ralph r-ralph commented Nov 17, 2023

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.

@r-ralph r-ralph changed the title Gradle agp kotlin Update fundamental libraries (Gradle, AGP, Kotlin) Nov 17, 2023

# https://kotlinlang.org/docs/releases.html#release-details
kotlin = "1.4.31"
kotlin = "1.9.10"
Copy link
Contributor

@ganadist ganadist Nov 17, 2023

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.

Suggested change
kotlin = "1.9.10"
kotlin = "1.8.20"

Copy link
Member Author

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.

Copy link
Contributor

@ganadist ganadist Nov 20, 2023

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.

@r-ralph r-ralph self-assigned this Nov 17, 2023
@r-ralph r-ralph added this to the 3.0.0 milestone Nov 17, 2023
Copy link
Contributor

@ganadist ganadist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@r-ralph r-ralph merged commit 55f55fa into line:master Nov 20, 2023
2 checks passed
@r-ralph r-ralph deleted the gradle_agp_kotlin branch November 20, 2023 01:50
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.

2 participants