In 2023 new version of Kotlin 1.9.0 was released. This is a major new release that Improve kotlin-reflect performance. The K2 compiler for the JVM is now in Beta. Now you can use the kapt plugin in your project along with the K2 compiler, but with some restrictions. If you execute the kapt compiler plugin within a project where languageVersion
is set to 2.0
, kapt will automatically switch to 1.9
and disable specific version compatibility checks.
Data object declarations, which were introduced in Kotlin 1.8.20, are now Stable. This includes the functions added for symmetry with data classes: toString()
, equals()
, and hashCode()
.This feature is particularly useful with sealed
hierarchies (like a sealed class
or sealed interface
hierarchy), because data object
declarations can be used conveniently alongside data class
declarations.