build: allow to change java toolchain for build and tests

This commit is contained in:
Skylot
2024-10-15 21:34:03 +01:00
parent 958ab245ae
commit 548821c4df
6 changed files with 53 additions and 5 deletions
@@ -8,6 +8,7 @@ plugins {
}
val jadxVersion: String by rootProject.extra
val jadxBuildJavaVersion: Int? by rootProject.extra
group = "io.github.skylot"
version = jadxVersion
@@ -32,6 +33,11 @@ repositories {
}
java {
jadxBuildJavaVersion?.let { buildJavaVer ->
toolchain {
languageVersion = JavaLanguageVersion.of(buildJavaVer)
}
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}