diff --git a/build.gradle.kts b/build.gradle.kts index d4c7b74..f2ccdf2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,7 +35,8 @@ group = "fr.username404" version = "0.3.4" val groupAndName = "${rootProject.group}.${rootProject.name.toLowerCase()}" -val javaVer: String = "8" +val javaVer: String = "16" +val sourceJavaVer: String = javaVer val kotlinVer: String by rootProject val kotlinSplitVersion = kotlinVer.split('.') val serializationVer: String by rootProject @@ -171,17 +172,15 @@ subprojects { }) } val homeDir = System.getProperty("java.home") as String - if (JavaVersion.current().isJava9Compatible) { - val jmodsLocations = setOf( - "$homeDir/jmods/java.base.jmod", - "$homeDir/jmods/java.desktop.jmod", - "$homeDir/jmods/java.instrument.jmod" - ) - if (jmodsLocations.all { !file(it).exists() }) throw GradleException("Jmods appear to be missing, please make sure that jmods are installed.") - else jmodsLocations.forEach { - libraryjars(it) - } - } else libraryjars("$homeDir/lib/rt.jar") + val jmodsLocations = setOf( + "$homeDir/jmods/java.base.jmod", + "$homeDir/jmods/java.desktop.jmod", + "$homeDir/jmods/java.instrument.jmod" + ) + if (jmodsLocations.all { !file(it).exists() }) throw GradleException("Jmods appear to be missing, please make sure that jmods are installed.") + else jmodsLocations.forEach { + libraryjars(it) + } // Note: dontpreverify() should NOT be used, it will cause errors at runtime useuniqueclassmembernames() optimizationpasses(4) @@ -220,7 +219,6 @@ allprojects { dependencies { implementation(kotlin("stdlib-jdk8", kotlinVer)) implementation(kotlin("reflect", kotlinVer)) - annotationProcessor("com.github.bsideup.jabel:jabel-javac-plugin:0.4.2") } tasks { withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) { @@ -244,7 +242,6 @@ allprojects { release.set(javaVer.toInt()) sourceCompatibility = "11" targetCompatibility = javaVer - compilerArgs.add("-Xplugin:jabel") } } withType(ProcessResources::class) {