Kotlin 1.9.20 Released
The Kotlin 1.9.20 release is out, the K2 compiler for all the targets is now in Beta, and Kotlin Multiplatform is now Stable.
Here are some highlights from this release:
- K2 is now in Beta for all the targets
- Stable Kotlin Multiplatform
- New default hierarchy template for setting up multiplatform projects
- Full support for the Gradle configuration cache in Kotlin Multiplatform
- Custom memory allocator enabled by default in Kotlin/Native
- Performance improvements for the garbage collector in Kotlin/Native
- New and renamed targets in Kotlin/Wasm, support for the latest Wasm GC
- Support for the WASI API in the standard library for Kotlin/Wasm
The New Kotlin K2 Compiler Is Beta for All Targets
The JetBrains team is continuing to stabilize the new K2 compiler, which will bring major performance improvements, speed up new language feature development, unify all platforms that Kotlin supports, and provide a better architecture for multiplatform projects.
With the 1.9.20 release, the new K2 compiler has reached the Beta stage for all platforms: JVM, Native, JS, and Wasm. This means that you can now try K2 in any Kotlin project.
The JetBrains team has ensured the quality of the new compiler by successfully compiling dozens of user and internal projects. A large number of users are also involved in the stabilization process, trying out the new K2 compiler in their projects and reporting any problems they find.
The Kotlin 1.9.20 release also brings K2 support in the kapt compiler plugin. Now, all essential Kotlin compiler plugins have K2 support. These include kapt, serialization, AtomicFU, Lombok, SAM with receiver, all-open, no-arg, jvm-abi-gen, Android Lint, and the Jetpack Compose compiler plugin. Kotlin Symbol Processing (KSP) with K2 support will be released within a week after Kotlin 1.9.20.
If you use any additional compiler plugins, check their documentation to see if they are compatible with K2.
The next stop is Kotlin 2.0
The next major version of Kotlin is 2.0.0, with the new K2 compiler as the default and stable for all targets.
To address any issues found as quickly as possible, we have planned a series of small, frequent Kotlin 2.0 stabilization releases. These releases will include Beta1, Beta2, Beta3, RC1, and RC2.
At the time of the Kotlin 2.0.0-RC1 release, we plan to ensure binary compatibility with code compiled by other versions of the Kotlin compilers and eliminate poisoning of binaries compiled with K2. This will enable you to use the new K2 compiler in production environments.
Get involved: shape Kotlin 2.0 and try the K2 compiler today
The K2 Compiler is on the verge of completing its stabilization process and becoming enabled by default in Kotlin 2.0. It is crucial that as many developers as possible give K2 a try and report any potential issues.
Your feedback will help us address any problems and ensure that K2 performs flawlessly, even in the most complex scenarios. Just a single compilation of your project using K2 can significantly contribute to reaching the Kotlin 2.0 milestone. Give K2 a try today!
How to install Kotlin 1.9.20
If you already use IntelliJ IDEA 2023.1, 2023.2, the IDE will suggest updating Kotlin to 1.9.20 automatically. You can also update manually by following these instructions. IntelliJ IDEA 2023.3 will include the Kotlin 1.9.20 plugin.
For Android Studio Hedgehog (231) and Iguana (232), the Kotlin 1.9.20 plugin will be included in upcoming Android Studios updates. If you need the command-line compiler, download it from the GitHub release page.
If you run into any problems
- Report issues to our issue tracker, YouTrack.
Special thanks to our EAP Champions 🥇👏
- Zac Sweers
- Alexander Nozik
- Oleg Yukhnevich
- Josh Friend
- Łukasz Wasylkowski
- Simon Marquis
- Benoit ‘BoD’ Lubek
- Rustam Musin
- Russell Wolf
- Jake Wharton
- Rick Clephas
- Artyom Shendrik
- Johannes Svensson
- Sterling Albury
- David Lopez
Stay up to date with the latest Kotlin features! Subscribe to receive Kotlin updates by filling out the form at the bottom of this post. ⬇️
What else to read and watch
- What’s new in Kotlin 1.9.20 documentation
- What’s new in Kotlin 1.9.20 on YouTube
- The K2 Compiler Is Going Stable in Kotlin 2.0
- Kotlin Multiplatform Is Stable and Production-Ready
- Kotlin EAP Champions
Subscribe to Blog updates
Thanks, we've got you!
Kotlin 1.9.0 Released
Kotlin 1.9.0 has been released! Highlights include: Kotlin K2 for JVM is in Beta, other K2 compiler updates, new enum class values function, new operator for open-ended ranges, preview of Gradle configuration cache in Kotlin Multiplatform, changes for Android target support in Kotlin Multiplatform, preview of custom memory allocator in Kotlin/Native. Learn more!
Introducing Kotlin Notebook
The first experimental version of the Kotlin Notebook plugin for IntelliJ IDEA is now available! This post will offer insight into the plugin’s functionality and use cases, but before launching into that, we’d like to let the plugin speak for itself: https://youtu.be/2PLYlDJPelQ W…
Kotlin 1.8.20 Released
Kotlin 1.8.20 has been released! Highlights include: Kotlin K2 compiler updates, AutoCloseable interface and Base64 encoding in stdlib, new JVM incremental compilation enabled by default, new Kotlin/Wasm compiler backend. Learn more!