Skip to content

Commit 8c0fe07

Browse files
authored
fix: outdated compilation configuration (#4652)
1 parent 0b17547 commit 8c0fe07

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

docs/topics/multiplatform/multiplatform-configure-compilations.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ kotlin {
9191
kotlin {
9292
jvm {
9393
val main by compilations.getting {
94-
compilerOptions.configure {
95-
jvmTarget.set(JvmTarget.JVM_1_8)
94+
compileTaskProvider.configure {
95+
compilerOptions {
96+
jvmTarget.set(JvmTarget.JVM_1_8)
97+
}
9698
}
9799
}
98100
}
@@ -106,8 +108,10 @@ kotlin {
106108
kotlin {
107109
jvm {
108110
compilations.main {
109-
compilerOptions.configure {
110-
jvmTarget = JvmTarget.JVM_1_8
111+
compileTaskProvider.configure {
112+
compilerOptions {
113+
jvmTarget = JvmTarget.JVM_1_8
114+
}
111115
}
112116
}
113117
}

docs/topics/multiplatform/multiplatform-dsl-reference.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -729,9 +729,11 @@ A compilation has the following parameters:
729729
kotlin {
730730
jvm {
731731
val main by compilations.getting {
732-
compilerOptions.configure {
733-
// Set up the Kotlin compiler options for the 'main' compilation:
734-
jvmTarget.set(JvmTarget.JVM_1_8)
732+
compileTaskProvider.configure {
733+
compilerOptions {
734+
// Set up the Kotlin compiler options for the 'main' compilation:
735+
jvmTarget.set(JvmTarget.JVM_1_8)
736+
}
735737
}
736738

737739
compileKotlinTask // get the Kotlin task 'compileKotlinJvm'
@@ -754,9 +756,13 @@ kotlin {
754756
```groovy
755757
kotlin {
756758
jvm {
757-
compilations.main.compilerOptions.configure {
758-
// Setup the Kotlin compiler options for the 'main' compilation:
759-
jvmTarget = JvmTarget.JVM_1_8
759+
compilations.main {
760+
compileTaskProvider.configure {
761+
compilerOptions {
762+
// Setup the Kotlin compiler options for the 'main' compilation:
763+
jvmTarget = JvmTarget.JVM_1_8
764+
}
765+
}
760766
}
761767
762768
compilations.main.compileKotlinTask // get the Kotlin task 'compileKotlinJvm'

0 commit comments

Comments
 (0)