Is it possible to use jdk17 in the whole multimodu...
# gradle
m
Is it possible to use jdk17 in the whole multimodule project, jvmtoolchain set to java 17 and still make one module in the project to compile to java8 bytecode? I have a need for single module to be compiled differently but would like to avoid having to use separate jdks. There is the
-release
option for the java compiler is there an equivalent for Kotlin compiler?
t
just set explicitly
jvmTarget
to
JvmTarget.JVM_1_8
in the module where you want to have java8 bytecode. It should override target from toolchain
m
But will it require me to have jdk8 installed 🤔
t
there is
-Xjdk-release
argument - probably that is what you are looking for
m
Possibly yes, will give it a try ;) thx