Saturday 28 November 2026 Edition compiled at 07.45 NL EN FR
← Tech · Programming languages
Tech · Programming languagesKotlin

Classes without identity and no more compiler on JDK 8: with a second release candidate, Kotlin 2.5 is ready for December

In the final test build JetBrains makes several language features stable, lets developers experiment with full value classes and has the compiler emit bytecode for Java 28.

· latest source update wo · 3 sources · Kotlin, DEV Community, Censuus · Compiled with AI
Illustration for this article

JetBrains released Kotlin 2.5.0-RC2 on 25 November, the second release candidate of the language's next major version, according to the documentation on kotlinlang.org. The final version is planned for December, Censuus and an overview on DEV Community write. Several features from Kotlin 2.3 and 2.4 become stable: improved compile-time constants, the @IntroducedAt annotation and the unused return value checker, which is now on by default. Name-based destructuring becomes the default in only-syntax mode.

Experimental, behind the -Xfull-value-classes flag, are full value classes: classes whose properties together define the value and where an object's identity does not matter. The compiler generates equals, hashCode and toString, but no copy or componentN. According to the DEV Community overview, a plain value class is then no longer automatically inline: single-property classes need inline or @JvmInline for that, and Kotlin 2.5.20 will warn about classes without that marker. There are also companion blocks and extensions and new functions such as onTrue, onFalse and ifOrNull. On the JVM the compiler can emit bytecode for Java 28.

Anyone still running the compiler on JDK 8 now gets an error: the minimum moves to JDK 17. This concerns the JDK the compiler itself runs on, not the bytecode target. The -Xallow-pre-17-runtime-jdk option allows it for now, until Kotlin 2.5.20 or 2.6.0. For Kotlin/Native, Swift export is now in beta with a new Gradle DSL, and a new publication format bundles artifacts into a single .kar archive: in the cryptography-kotlin example the number of files fell from 7,539 (91 MB) to 1,036 (23 MB).

Spotted a mistake in this article? Let us know.