This message was deleted.
# community-support
s
This message was deleted.
c
The intention of the toolchain is to match up with the desired target JVM version - if your goal is to target Java 8, use a Java 8 toolchain.
m
The thing is the toolchain is also used to run tests, right?
I need 11 to run my tests (because of Android) but still want to produce Java8 bytecode
c
yes. you can specify a separate toolchain for that (it defaults to the same one as compiling).
💡 1
m
That worked, thanks!
👍 1
t
Fwiw, I see no reason why you couldn't also use a JDK 11 toolchain for everything and pass
--release 8
(through
options.release.set(8)
of the
JavaCompile
tasks)
👀 1
m
Ah nice, that'd avoid downloading/installing one more toolchain. But might not allow Gradle to set the metadata correctly in
.module
files?
So I'd certainly need to override the 11 manually there (not sure...)
e
Copy code
compileJava.options.release.set(8)
should also set the metadata
🎉 1
thank you 1