diff --git a/src/main/kotlin/Scientifik.kt b/src/main/kotlin/Scientifik.kt index 73f0ce6..246d091 100644 --- a/src/main/kotlin/Scientifik.kt +++ b/src/main/kotlin/Scientifik.kt @@ -1,10 +1,14 @@ +import org.gradle.api.JavaVersion + /** * Build constants */ object Scientifik { const val coroutinesVersion = "1.3.4" const val serializationVersion = "0.20.0" - const val JVM_VERSION = "11" + + val JVM_TARGET = JavaVersion.VERSION_11 +// val JVM_VERSION = JVM_TARGET.toString() object Serialization{ const val xmlVersion = "0.20.0.0" diff --git a/src/main/kotlin/scientifik/ScientifikJVMPlugin.kt b/src/main/kotlin/scientifik/ScientifikJVMPlugin.kt index cbcd037..5e786e8 100644 --- a/src/main/kotlin/scientifik/ScientifikJVMPlugin.kt +++ b/src/main/kotlin/scientifik/ScientifikJVMPlugin.kt @@ -22,12 +22,12 @@ open class ScientifikJVMPlugin : Plugin { repositories.applyRepos() extensions.findByType()?.apply { - targetCompatibility = enumValueOf(Scientifik.JVM_VERSION) + targetCompatibility = Scientifik.JVM_TARGET } tasks.withType { kotlinOptions { - jvmTarget = Scientifik.JVM_VERSION + jvmTarget = Scientifik.JVM_TARGET.toString() } } diff --git a/src/main/kotlin/scientifik/ScientifikMPPlugin.kt b/src/main/kotlin/scientifik/ScientifikMPPlugin.kt index 720fe76..abe1284 100644 --- a/src/main/kotlin/scientifik/ScientifikMPPlugin.kt +++ b/src/main/kotlin/scientifik/ScientifikMPPlugin.kt @@ -26,7 +26,7 @@ open class ScientifikMPPlugin : Plugin { jvm { compilations.all { kotlinOptions { - jvmTarget = Scientifik.JVM_VERSION + jvmTarget = Scientifik.JVM_TARGET.toString() } } }