In java, one can build a library with the Latest p...
# library-development
a
In java, one can build a library with the Latest possibpe version, but targets lower versions (mostly 1.8) during compilations. So yoy tend to use late technology, but keep users of the old ones happy. Do we have something similar for kotlin??
m
You have
languageVersion
and
apiVersion
It's only for JVM though. AFAIK, it's not working for native and JS. (see also https://youtrack.jetbrains.com/issue/KT-42293/Native-provide-binary-compatibility-between-incremental-releases)
My current strategy is to allow at least 1year to upgrade. So when Kotlin 1.8 goes out, set
languageVersion
to 1.7 so that users of 1.6 can still use it (JVM has a forward compatibility of 1)