set target JDK to 11, even if compiled with > 11

Mon, 04 Jan 2021 15:14:26 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 04 Jan 2021 15:14:26 +0100
changeset 174
690a9aad3f16
parent 173
1dc56ab7845e
child 175
1e6f2aace666

set target JDK to 11, even if compiled with > 11

build.gradle.kts file | annotate | diff | comparison | revisions
--- a/build.gradle.kts	Mon Jan 04 12:45:46 2021 +0100
+++ b/build.gradle.kts	Mon Jan 04 15:14:26 2021 +0100
@@ -19,6 +19,12 @@
     kotlinOptions.jvmTarget = "11"
 }
 
+// remove after removing all java sources
+tasks.withType<JavaCompile>().configureEach {
+    sourceCompatibility = "11"
+    targetCompatibility = "11"
+}
+
 tasks.war {
     archiveFileName.set("lightpit.war")
     from("src/main/resources")

mercurial