diff --git a/maestro-cli/build.gradle.kts b/maestro-cli/build.gradle.kts index dbad198dc9..9a08005d65 100644 --- a/maestro-cli/build.gradle.kts +++ b/maestro-cli/build.gradle.kts @@ -1,4 +1,5 @@ import org.jreleaser.model.Active.ALWAYS +import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask import org.jreleaser.model.Stereotype import java.util.Properties @@ -65,6 +66,12 @@ java { targetCompatibility = JavaVersion.VERSION_1_8 } +tasks.named("compileKotlin", KotlinCompilationTask::class.java) { + compilerOptions { + freeCompilerArgs.addAll("-Xjdk-release=1.8") + } +} + tasks.create("createProperties") { dependsOn("processResources") diff --git a/maestro-utils/build.gradle b/maestro-utils/build.gradle index d658e1bb8e..6edc60071b 100644 --- a/maestro-utils/build.gradle +++ b/maestro-utils/build.gradle @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask + plugins { id("maven-publish") alias(libs.plugins.kotlin.jvm) @@ -17,6 +19,12 @@ java { targetCompatibility = JavaVersion.VERSION_1_8 } +tasks.named("compileKotlin", KotlinCompilationTask) { + compilerOptions { + freeCompilerArgs.addAll("-Xjdk-release=1.8") + } +} + plugins.withId("com.vanniktech.maven.publish") { mavenPublish { sonatypeHost = "S01"