Fix JVM version

This commit is contained in:
Alexander Nozik 2020-05-05 22:20:45 +03:00
parent 9e37d6f752
commit 7a282fa207
3 changed files with 8 additions and 4 deletions

View File

@ -1,10 +1,14 @@
import org.gradle.api.JavaVersion
/** /**
* Build constants * Build constants
*/ */
object Scientifik { object Scientifik {
const val coroutinesVersion = "1.3.4" const val coroutinesVersion = "1.3.4"
const val serializationVersion = "0.20.0" 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{ object Serialization{
const val xmlVersion = "0.20.0.0" const val xmlVersion = "0.20.0.0"

View File

@ -22,12 +22,12 @@ open class ScientifikJVMPlugin : Plugin<Project> {
repositories.applyRepos() repositories.applyRepos()
extensions.findByType<JavaPluginExtension>()?.apply { extensions.findByType<JavaPluginExtension>()?.apply {
targetCompatibility = enumValueOf(Scientifik.JVM_VERSION) targetCompatibility = Scientifik.JVM_TARGET
} }
tasks.withType<KotlinCompile> { tasks.withType<KotlinCompile> {
kotlinOptions { kotlinOptions {
jvmTarget = Scientifik.JVM_VERSION jvmTarget = Scientifik.JVM_TARGET.toString()
} }
} }

View File

@ -26,7 +26,7 @@ open class ScientifikMPPlugin : Plugin<Project> {
jvm { jvm {
compilations.all { compilations.all {
kotlinOptions { kotlinOptions {
jvmTarget = Scientifik.JVM_VERSION jvmTarget = Scientifik.JVM_TARGET.toString()
} }
} }
} }