Kite Jvm Scope
The JVM topic, inside kiteConfig { jvm { ... } }.
| member | meaning | default |
|---|---|---|
toolchain | the JDK that compiles and runs tests | whatever the module already uses |
target | the bytecode level, for Java and Kotlin together | whatever the module already uses |
kiteConfig {
jvm {
toolchain = 21 // build with JDK 21
target = 17 // produce class files Java 17 can load
}
}Content copied to clipboard
target is set on the Java and the Kotlin side at once. Setting only one of them is the mistake this block exists to prevent: a module with both languages then fails with "inconsistent JVM-target compatibility", and the message does not say which half moved.
Android and desktop can each override either value. iOS cannot: there is no JVM there, and ios { jvm { } } does not compile.