From e1cbbc339eb72b502b9dcc5647e86770ac6869ee Mon Sep 17 00:00:00 2001 From: Lexie Malina Date: Sun, 24 Nov 2024 06:54:14 -0600 Subject: [PATCH] GH-2287 Remove the deprecated `kotlinOptions` DSL (Resolves #2286) Change build.gradle.kts, replacing the `kotlinOptions` DSL syntax with the currently supported equivalent `compilerOptions`. --- build.gradle.kts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index bdb72446b..2b7d07df8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion import org.jetbrains.kotlin.gradle.tasks.KotlinCompile /* @@ -108,9 +110,9 @@ allprojects { } tasks.withType().configureEach { - kotlinOptions { - jvmTarget = "11" - languageVersion = "1.9" + compilerOptions { + jvmTarget = JvmTarget.JVM_11 + languageVersion = KotlinVersion.KOTLIN_1_9 freeCompilerArgs = listOf("-Xjvm-default=all") // For generating default methods in interfaces } }