File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
build-logic/src/main/kotlin Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import org.gradle.kotlin.dsl.the
13
13
import org.gradle.kotlin.dsl.withType
14
14
import org.gradle.language.base.plugins.LifecycleBasePlugin
15
15
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
16
+ import org.jetbrains.kotlin.gradle.dsl.KotlinJvmExtension
17
+ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
16
18
import org.jetbrains.kotlin.gradle.dsl.kotlinExtension
17
19
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
18
20
@@ -27,10 +29,14 @@ abstract class KotlinCommonPlugin : Plugin<Project> {
27
29
JavaLanguageVersion .of(projectLibs.findVersion(" java-compilation" ).get().requiredVersion)
28
30
val javaTargetVersion = JavaLanguageVersion .of(projectLibs.findVersion(" java-target" ).get().requiredVersion)
29
31
30
- kotlinExtension.apply {
32
+ ( kotlinExtension as KotlinJvmExtension ) .apply {
31
33
// All modules, the CLI included, must have an explicit API
32
34
explicitApi()
33
35
jvmToolchain(jdkVersion = javaCompilationVersion.asInt())
36
+
37
+ compilerOptions {
38
+ apiVersion.set(KotlinVersion .KOTLIN_2_0 )
39
+ }
34
40
}
35
41
36
42
tasks.withType<JavaCompile >().configureEach {
You can’t perform that action at this time.
0 commit comments