Paul Krill
Editor at Large

Kotlin bolsters K2 compiler plugin support, WebAssembly debugging

news
Mar 21, 20252 mins

Kotlin 2.1.20 brings updates to the new kapt and Lombok compiler plugins and makes the K2 implementation of kapt the default.

A computer screen shows the Kotlin logo against a backdrop of code.
Credit: Trismegist san / Shutterstock

Kotlin 2.1.20, just released as the latest version of JetBrains’ cross-platform programming language, improves both plugin support for the K2 compiler and Kotlin/Wasm debugging.

The Kotlin update was announced March 20. Instructions on updating can be found at kotlinlang.org.

For the K2 compiler, Kotlin 2.1.20 brings updates to the new kapt and Lombok compiler plugins, including having the kapt compiler plugin enabled by default for all projects. Kotlin’s builders have been improving performance of the kapt annotation processing compiler dating back to Kotlin 1.9.20, from October 2023. But kapt has been in maintenance mode, meaning JetBrains keeps it up-to-date with Kotlin and Java but has no plans to add new features. The experimental Lombok plugin, for using Java Lombok declarations, now supports the @SuperBuilder annotation, thus making it easier to create builders for class hierarchies.

With Kotlin/Wasm, for compiling Kotlin code into the WebAssembly format, Kotlin 2.1.20 improves property usage and debugging. Custom formatters now work out of the box in development builds and DWARF (debugging with arbitrary record format) facilitates code inspection. DWARF data can be embedded into the embedded WebAssembly binary. Many debuggers and virtual machines can read this data to provide insights into compiled code.

Also in Kotlin 2.1.20:

  • The Compose compiler relaxes some restrictions on @Composable functions introduced in prior releases. Also, the Compose compiler Gradle plugin is set to include source information by default, aligning the behavior on all platforms with Android.
  • The standard library introduces experimental features including common atomic types, improved support for UUIDs (Universally Unique Identifiers), and new time-tracking functionality.
  • For Kotlin/Native, a new inlining optimization pass is being introduced.
  • Kotlin plugins supporting Kotlin 2.1.20 are bundled into the latest IntelliJ IDEA and Android Studio IDEs.
  • For Kotlin Multiplatform, a new DSL (domain specific language) replaces the Gradle Application plugin.
Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a β€œBest Technology News Coverage” award from IDG.

More from this author