Skip to content

Commit 6f5446c

Browse files
committed
Migrate kotlinOptions to compilerOptions
> Configure project :build-logic:convention w: build-logic/convention/build.gradle.kts:17:3: 'kotlinOptions(KotlinJvmOptionsDeprecated /* = KotlinJvmOptions */.() -> Unit): Unit' is deprecated. Please migrate to the compilerOptions DSL. More details are here: https://kotl.in/u1r8ln
1 parent 4f921c3 commit 6f5446c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

build-logic/convention/build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) 2024. Tony Robalik.
22
// SPDX-License-Identifier: Apache-2.0
3-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
44

55
plugins {
66
id("java-gradle-plugin")
@@ -13,9 +13,9 @@ java {
1313
}
1414
}
1515

16-
tasks.withType<KotlinCompile>().configureEach {
17-
kotlinOptions {
18-
jvmTarget = libs.versions.java.get()
16+
kotlin {
17+
compilerOptions {
18+
jvmTarget = libs.versions.java.map(JvmTarget::fromTarget).get()
1919
freeCompilerArgs = listOf("-Xinline-classes", "-opt-in=kotlin.RequiresOptIn", "-Xsam-conversions=class")
2020
}
2121
}

0 commit comments

Comments
 (0)