Upgrade Java language level to 11

This commit is contained in:
Matthias Gugel 2021-12-11 23:33:18 +01:00
parent fa105a2919
commit 7cec2bc5a7
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
fun properties(key: String) = project.findProperty(key).toString()
plugins {
@ -19,9 +21,16 @@ intellij {
}
tasks {
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
// Set the JVM compatibility versions
properties("javaVersion").let {
withType<JavaCompile> {
sourceCompatibility = it
targetCompatibility = it
}
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = it
}
}
}

View File

@ -6,6 +6,9 @@ pluginName = filename_template
pluginVersion = 1.2.0-213
platformVersion = 2021.3
# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
javaVersion = 11
gradleVersion = 7.3
# Opt-out flag for bundling Kotlin standard library.