From a1d914c895d2f370aeb62f31e3880a8089722038 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Thu, 23 Feb 2023 14:14:20 -0800 Subject: [PATCH] Reverted to using jvmTarget --- build.gradle.kts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b8b1849..c5739a5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent import org.jetbrains.dokka.gradle.DokkaTask +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { id("com.github.ben-manes.versions") version "0.46.0" @@ -40,9 +41,8 @@ dependencies { } java { - toolchain { - languageVersion.set(JavaLanguageVersion.of(11)) - } + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 withSourcesJar() } @@ -67,6 +67,10 @@ tasks { useJUnitPlatform() } + withType().configureEach { + kotlinOptions.jvmTarget = java.targetCompatibility.toString() + } + withType { testLogging { exceptionFormat = TestExceptionFormat.FULL @@ -74,6 +78,14 @@ tasks { } } + withType().configureEach { + this.jvmTarget = java.targetCompatibility.toString() + } + + withType().configureEach { + this.jvmTarget = java.targetCompatibility.toString() + } + withType { destination = file("$projectDir/pom.xml") }