If my Kotlin library uses Kotlin 2.2 with language version set at 1.8 then in my Kotlin app that uses Kotlin version 1.9, can I use my library?
👌 1
v
Vampire
05/13/2026, 9:40 PM
You can use all language versions up to 2.0 from 1.9
a
Atul Gupta
05/14/2026, 1:59 PM
Hi, thanks for the reply, but can I use latest kotlin version in my lib and then using some config like
languageVersion
in the lib, make that lib target very old kotlin version coming from the app?
v
Vampire
05/15/2026, 5:58 AM
Yes, of course. As I said, if you compile for language version 2.0, all consumers that use 1.9 or newer can use it. If you compile for 1.8, then 1.7 and newer can use it.