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

Bump Kotlin to 2.1.0 #6291

Merged
merged 26 commits into from
Nov 29, 2024
Merged

Bump Kotlin to 2.1.0 #6291

merged 26 commits into from
Nov 29, 2024

Conversation

BoD
Copy link
Contributor

@BoD BoD commented Nov 28, 2024

Note: we keep the stdlib fixed to 2.0.0

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Nov 28, 2024

✅ Docs Preview Ready

No new or changed pages found.

@martinbonnin
Copy link
Contributor

Note: we keep the stdlib fixed to 2.0.0

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.

Comment on lines 64 to 66
options.release.set(17)
// Do not use options.release - see https://issuetracker.google.com/issues/278800528
sourceCompatibility = "17"
targetCompatibility = "17"
Copy link
Contributor

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)

Copy link
Contributor

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?

Copy link
Contributor

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

android-plugin = "8.2.2"
android-plugin = "8.7.0"
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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 🙃

Copy link
Contributor Author

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 👍

Comment on lines 136 to 137
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
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

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

BoD and others added 3 commits November 28, 2024 16:53
* 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
@BoD BoD merged commit 89fad7d into main Nov 29, 2024
6 checks passed
@BoD BoD deleted the kotlin-2.1.0 branch November 29, 2024 09:19
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.

3 participants