From 267c2877778503613f0f7165baaa458c859571fa Mon Sep 17 00:00:00 2001 From: Jonas Tobias Hopusch Date: Sun, 5 Sep 2021 21:12:28 +0200 Subject: [PATCH] Always target Java 16 during compilation --- app/build.gradle.kts | 13 +++++++++++++ compile.sh | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9fd91b0..061be2a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -36,6 +36,19 @@ dependencies { testImplementation("org.jetbrains.kotlin:kotlin-test-junit") } +java { + sourceCompatibility = JavaVersion.VERSION_16 + targetCompatibility = JavaVersion.VERSION_16 +} + +tasks { + compileKotlin { + kotlinOptions { + jvmTarget = "16" + } + } +} + application { // Define the main class for the application. mainClass.set("de.jotoho.waituntil.StartKt") diff --git a/compile.sh b/compile.sh index 4066495..94bbae6 100755 --- a/compile.sh +++ b/compile.sh @@ -1,3 +1,3 @@ #!/bin/sh -kotlinc app/src/main/kotlin/de/jotoho/waituntil/start.kt -include-runtime -d waituntil.jar +kotlinc app/src/main/kotlin/de/jotoho/waituntil/start.kt -jvm-target 16 -include-runtime -d waituntil.jar