With AGP 9.0's built-in Kotlin support, the Kotlin...
# android
n
With AGP 9.0's built-in Kotlin support, the Kotlin compiler is now bundled with AGP (e.g., 9.0.0 includes Kotlin 2.2.10). Previously, we defined the Kotlin version once in libs.versions.toml and shared it across the Kotlin plugin and libraries like kotlin-test and kotlinx-serialization. Now those libraries still need explicit versions, but there's no easy way to keep them in sync with the bundled version. How are you managing this?
k
We have a separate build.versions.toml for convention plugins. They'll always be out of sync...we have had this before AGP 9...
😅 1
k
Will this ever break AGP? We've had it break Gradle when we've tried this (what I meant above).
z
I'm not sure what their compatibility guarantees are, but it's only the lowering of versions that has a warning in their release notes.
k
hmm...we've tried force upgrading kotlin versions in the past (wanted to use newer Kotlin features in Gradle) and have broken Gradle but it was major versions IIRC 🙂
n
I had missed that part of the documentation. Since Kotlin 2.3.10 is already out, I'll go with defining kotlin-gradle-plugin in the version catalog. Thank you!
z
There's now also a video you can reference for this same info, which was just published 🙂

https://youtu.be/m0Cq6J-V_RY?t=185▾

🎉 4
nice spin 3
358 Views