Gadulka 1.5 and Kotlin 2.1.0

Posted by:

  • Avatar of Konstantin

    Konstantin

A small update adopts Kotlin 2.1.0 and K2 mode

A new minor release of Gadulka is now available targeting Kotlin 2.1.0.

If you're using the library, it should be possible to upgrade without other changes on your end. Bumping the Kotlin version brings some exciting language features and opportunities for optimizations like guard conditions in a when statement (I use when practically all the time) as well as Kotlin Native improvements and support for Swift export.

If you encounter a problem, please don't hesitate to open an issue!

I finally decided to give K2 mode a try and the results were fantastic 🤩. To illustrate, Gadulka is a tiny library for Kotlin Multiplatform and this is how K2 affected the time it takes for IntelliJ to load the project:

  • Without K2: ~8 seconds
  • With K2: ~1.5 seconds 😍

On a larger project of a complex app, the results were even more exciting, cutting the time from almost 40 seconds down to a mere 11 seconds.

(Note, the timing is recorded 'by hand', not very scientific, but you get the idea)

K2 mode is still opt-in but stable. You should give it a try!

gadulka

Tags