mbonnin
10/04/2023, 5:12 PMcompileKotlin
? As long as I set Kotlin jvmTarget
(and Java options.release
?), is there any reason 2 different JDKs would produce different class files?mbonnin
10/05/2023, 9:03 AMVampire
10/05/2023, 9:40 AMByteBuffer#flip
which used to return Buffer
and now returns ByteBuffer
.mbonnin
10/05/2023, 9:41 AM--release
?mbonnin
10/05/2023, 9:44 AM--release
according to jvmTarget
or allow me to configure itVampire
10/05/2023, 10:12 AMIsn't that the whole point of --release ?
Yes
I'd expect the Kotlin compiler to either set --release according to jvmTarget or allow me to configure it
If I look at issues like https://github.com/Kotlin/kotlinx.serialization/pull/2350, I'd say it does not.
Alexander.Likhachev
10/05/2023, 11:34 AMjvmTarget
, Java’s targetCompatibility
, choose the right Java stdlib, configure publishing attributes, etc. It doesn’t cause the Kotlin compiler to be executed on the old JDK, but configures the compilation to run against that JDK.
Manual configuration of jvmTarget
is kinda a low-level configuration key, similar to Java’s --target
, not --release
. The Kotlin compiler has the argument -Xjdk-release
that serves the same needs as --release
of the Java compiler, however it’s not yet stabilizedmbonnin
10/05/2023, 11:38 AMmbonnin
10/05/2023, 11:39 AM