-
Notifications
You must be signed in to change notification settings - Fork 656
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
Bump Kotlin to 2.1.0 #6291
Bump Kotlin to 2.1.0 #6291
Conversation
✅ Docs Preview ReadyNo new or changed pages found. |
Conservative libraries with liberal tooling 👍 Would be cool to implement https://github.com/JakeWharton/dependency-tree-diff so this information is surfaced in pull requests. |
build-logic/build.gradle.kts
Outdated
options.release.set(17) | ||
// Do not use options.release - see https://issuetracker.google.com/issues/278800528 | ||
sourceCompatibility = "17" | ||
targetCompatibility = "17" |
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.
IIRC, this is only for Android compile tasks. Java compile tasks should still use options.release.set(17)
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.
In this file there's no Android so I think release
should work?
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.
FWIW, this is how I do it in librarian: https://github.com/GradleUp/librarian/blob/2be199a3b4f3d3cac8f7560d101a138d64ae8f96/librarian-gradle-plugin/src/main/kotlin/com/gradleup/librarian/gradle/compatibility.kt#L50
This is definitely not tested against 2.1.0 so take with large grains of salt
gradle/libraries.toml
Outdated
android-plugin = "8.2.2" | ||
android-plugin = "8.7.0" |
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.
Is this required to build with Kotlin 2.1.0? If yes, is there an AGP <-> KGP compatibility matrix somewhere?
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.
So I just tried reverting to 8.2.2 and it does work - I don't remember why I bumped it, I guess at some point in the dev builds something wasn't working. I can't find anything about Kotlin compatibility here, just Gradle version compat.
So no reason to bump, OK with you to revert it?
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'm all for more granular releases
Re: build-time AGP, I'm team "update to the latest version that's working in IJ" but I can never remember which one it is 🙃
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.
Ah there is something here actually. It says AGP 8.2.2 should be compatible with KGP 2.1.0 👍
gradle/libraries.toml
Outdated
kotlin-test-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlin-stdlib" } # use the same version as the stdlib | ||
kotlin-test-junit-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit", version.ref = "kotlin-stdlib" } # use the same version as the stdlib |
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.
This is https://youtrack.jetbrains.com/issue/KT-58999/ coming back at us. Ideally we don't need all of that because apiVersion
. Actually I wonder if we could implement that ourselved 🤔 . I'll try to open a PR
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.
...erver/src/commonMain/kotlin/com/apollographql/apollo/debugserver/internal/graphql/GraphQL.kt
Show resolved
Hide resolved
(cherry picked from commit 5cbb969)
…d code compilation with 1.9
* Use same version as apiVersion for stdlib & friends See https://youtrack.jetbrains.com/issue/KT-58999/ * Do not conflict with KGP dependency handling * Keep JS stdlib aligned with the compiler * fixed parallel forks * Revert "fixed parallel forks" This reverts commit 479651f. * more heap size
Note: we keep the stdlib fixed to 2.0.0