Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to verify i'm using the Kotlin 2 compiler K2

Tags:

android

kotlin

I'm migrating a rather large Android-App from Kotlin 1.9.x to 2.0. for testing purposes.

How can i test that this has worked? I have seen zero new errors/warnings in my code after the migration, which makes me very suspicious.

like image 765
m.reiter Avatar asked Jan 22 '26 12:01

m.reiter


1 Answers

You can call KotlinVersion.CURRENT to get the Kotlin version the code was compiled with.

like image 91
Leviathan Avatar answered Jan 25 '26 02:01

Leviathan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!