Kotlin 2.4.0 Ships Stable Context Parameters and Explicit Backing Fields, Retiring the K1 Compiler
JetBrains released Kotlin 2.4.0 on June 4, promoting context parameters and explicit backing fields to Stable, dropping the K1 compiler, and adding Swift package dependencies for Multiplatform.
Overview
JetBrains shipped Kotlin 2.4.0 on June 4, 2026, a release that graduates several long-experimental language features to Stable and closes out the language’s transition away from its original compiler frontend. According to the Kotlin project’s What’s New page, the release was published on “04 June 2026.” The JetBrains announcement summarizes the main highlights as stable context parameters, explicit backing fields, and multiple features for annotation use-site targets, alongside changes spanning the standard library, Kotlin/JVM, Kotlin/Native, Kotlin/Wasm, Kotlin/JS, Gradle, and Maven.
Language Features Reach Stable
The headline change is the stabilization of features that had been incubating across earlier releases. The Kotlin documentation states that “Kotlin 2.2.0 and 2.3.0 introduced a few language features as Experimental,” and that the following are “now Stable in this release: Context parameters, except for context arguments and callable references.” Context parameters let functions and properties declare contextual requirements that are resolved from the surrounding call site rather than passed explicitly. Explicit backing fields, which use the field keyword to give developers direct control over a property’s underlying storage, are also promoted to Stable, as are the @all meta-target for properties and new defaulting rules for use-site annotation targets, per the Kotlin documentation.
This follows JetBrains’ preview of these stabilizations in the 2.4 release candidate at KotlinConf 2026, as previously reported. The 2.4.0 release moves them from the release candidate into the final, stable line.
K1 Compiler Retired
Kotlin 2.4.0 also removes the language’s legacy compiler frontend. According to the Kotlin documentation, “Starting with Kotlin 2.4.0, the compiler no longer supports -language-version=1.9. As a result, the K1 compiler is no longer supported.” The K2 frontend, which became the default in earlier 2.x releases, is now the only supported compiler.
Multiplatform, Native, and Web Targets
For Kotlin Multiplatform developers targeting Apple platforms, the release adds the ability to consume Swift libraries. The Kotlin documentation notes that “Kotlin Multiplatform projects now can declare Swift packages as dependencies for an iOS app in their Gradle configuration,” and that Swift export is “officially in Alpha.” On Kotlin/Native, the concurrent mark and sweep garbage collector is enabled by default; the documentation says that “After processing user feedback and fixing regressions, we are now ready to enable CMS by default, starting with Kotlin 2.4.0.” The same target also updates LLVM “from version 19 to 21” and raises the default minimum supported versions of Apple targets, including iOS and tvOS “from 14.0 to 15.0” and macOS “from 11.0 to 12.0,” according to the Kotlin documentation.
On the web side, Kotlin/Wasm makes incremental compilation “Stable and enabled by default,” and Kotlin/JS gains the ability to export inline value classes to JavaScript and TypeScript, lifting a prior limitation, per the Kotlin documentation.
Toolchain and Standard Library
Kotlin/JVM in 2.4.0 adds support for Java 26, and the standard library stabilizes the UUID API along with new functions for checking sorted order, according to the JetBrains announcement. The Kotlin documentation specifies that the kotlin.uuid.Uuid API becomes Stable. On the build side, the Kotlin documentation states that “Kotlin 2.4.0 is fully compatible with Gradle 7.6.3 through 9.5.0,” while the minimum supported Android Gradle plugin version rises to 8.5.2.
JetBrains advises developers to update by changing “the Kotlin version to 2.4.0” in their build scripts, according to the JetBrains announcement. The 2.4 line succeeds the 2.3.20 point release that shipped in March.