Kotlin 1.9.0 Release: Stabilizing Language Features and Introducing enum class values Function Replacement
Kotlin 1.9.0 marks a significant update in JetBrains’ statically typed language, renowned for its pivotal role in Android mobile development. This version introduces a beta of the K2 compiler, designed to enhance performance on the JVM and slated to unify Kotlin’s support across all platforms it targets.
Alongside the K2 compiler, Kotlin 1.9.0, released on July 5, also brings initial support for Kotlin/Native and multiplatform projects. K2 aims not only to boost performance but also to streamline the integration of new language features and provide an API for extending the compiler. It is anticipated that K2 will become the default stable compiler in Kotlin 2.0, underlining its strategic importance for future Kotlin developments.
Developers eager to explore the capabilities of the K2 compiler can now enable it using the kotlin.experimental.tryK2=true
Gradle property in Kotlin 1.9.0. Moreover, enhancements in Gradle build system reports now indicate whether K2 or the current compiler was utilized for compiling code, offering transparency and control over compilation processes. Additionally, Kotlin 1.9.0 supports the Gradle configuration cache, a feature that accelerates build times, particularly beneficial for multiplatform libraries.
Kotlin 1.9.0, the latest version of JetBrains’ statically typed language that has become critical in Android mobile development, features a beta of the performance-boosting K2 compiler for the JVM.
Also with the Kotlin 1.9.0 release, unveiled July 5, basic support is offered in K2 for Kotlin/Native and multiplatform projects. K2 has been geared to boost performance, unify all platforms Kotlin supports, speed up development of new language features, and provide an API for compiler extensions. K2 is due to become the default stable compiler in Kotlin 2.0.
Beginning with Kotlin 1.9.0, developers can test the K2 compiler with the kotlin.experimental.tryK2=true
Gradle property. In Kotlin 1.9.0, Gradle build system reports now show whether K2 or the current compiler was used to compile code. The Gradle configuration cache, which speeds up the build process, is supported in multiplatform libraries.
Kotlin 1.9.0 follows Kotln 1.8.0, which introduced support for Java 19 and experimental functions for copying or deleting directory content on the JVM. Instructions on getting started with Kotlin can be found on the project website.