Languages and toolchains
These properties select the source languages and Java, Kotlin, and Scala versions used by the build.
languages
Controls which JVM source languages participate in the initial classes compilation pass.
Default:
- Kotlin
- Java
- Scala
Example:
1 2 3 4 5 | |
Effect:
compileKotlinonly runs whenKOTLINis enabledcompileJavaonly runs whenJAVAis enabledcompileScalaonly runs whenSCALAis enabled- The Scala plugin and runtime are added only when
SCALAis enabled
toolchain.javaVersion
Configures the Java and Kotlin toolchains used for compilation.
Default:
17
Example:
1 2 3 | |
Rules:
- the plugin rejects any value below JDK
17 - the value is applied to both the Java toolchain and the Kotlin JVM toolchain
toolchain.kotlinVersion
Expected Kotlin Gradle plugin version for the build.
Default:
2.3.20
Example:
1 2 3 | |
Rules:
- must be at least
2.3.20for the current Godot-JVM release - if no Kotlin JVM plugin is declared, Godot-JVM applies Kotlin
2.3.20automatically - an explicitly declared higher version is accepted when
toolchain.kotlinVersionkeeps its default - if you override it, you must also apply
org.jetbrains.kotlin.jvmexplicitly with the same version beforecom.utopia-rise.godot-jvm, otherwise the build fails with a version mismatch
Example with explicit override:
1 2 3 4 5 6 7 8 | |
toolchain.scalaVersion
Scala version used when Scala support is enabled.
Default:
3.6.3
Example:
1 2 3 | |
Rules:
- only matters when
languagescontainsGodotLanguage.SCALA - must be at least Scala
3.0.0