Hey :) i know there's an option to tell kotlin whi...
# announcements
Hey :) i know there's an option to tell kotlin which bytecode level to produce. Is there anything that also prevents from compiling against jdk stuff from above the specified version? With java, there is the --release flag, which is also nicely supported by gradle 6.6 now. We need to be able to use jdk for example 11, but our application has to run on java 8. Thanks in advance for any hints :)
kotlinc itself has https://kotlinlang.org/docs/reference/compiler-reference.html#-jvm-target-version assuming you're using Gradle, not exactly sure how to set that though. the default is 1.6 anyway
Thx for your answer. But as i said, i know how to configure bytecode level. That's not the same as the Release flag, because setting the bytecode level does not prevent usage of jdk 11 methods for example.
oh...sorry, reading comprehension fail ­čś×
You can use
parameter to specify the path to the JDK which should be used to resolve JDK stuff. Set it to the path to JDK 8 and you won't be able to call API that is missing in that JDK.
Thanks for your feedback, vote is out :) I can't use java Home because we are building in docker and only have one jdk in there