KiteJvmScope

abstract class KiteJvmScope

The JVM topic, inside kiteConfig { jvm { ... } }.

membermeaningdefault
toolchainthe JDK that compiles and runs testswhatever the module already uses
targetthe bytecode level, for Java and Kotlin togetherwhatever the module already uses
kiteConfig {
jvm {
toolchain = 21 // build with JDK 21
target = 17 // produce class files Java 17 can load
}
}

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.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val target: Property<Int>

The bytecode level, applied to Java and Kotlin together.

Link copied to clipboard
abstract val toolchain: Property<Int>

The JDK used to compile and to run host tests, as a major version.