Releases

Kotlin 1.9.20 Released

Read this post in other languages:

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

For the complete list of changes, refer to What’s new in Kotlin 1.9.20 or the release notes on GitHub.

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!

Try the K2 compiler

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 🥇👏

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

image description