File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
compiler-plugin/compiler-plugin-k2
gradle-conventions-settings/src/main/kotlin/util Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode
77import util.enableContextParameters
88import util.otherwise
99import util.whenForIde
10- import util.whenKotlinIsAtLeast
10+ import util.whenKotlinCompilerIsAtLeast
1111
1212plugins {
1313 alias(libs.plugins.conventions.jvm)
@@ -69,7 +69,7 @@ tasks.jar {
6969kotlin {
7070 explicitApi = ExplicitApiMode .Disabled
7171
72- rootProject.whenKotlinIsAtLeast (2 , 2 , 0 ) {
72+ rootProject.whenKotlinCompilerIsAtLeast (2 , 2 , 0 ) {
7373 enableContextParameters()
7474 }
7575}
Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ enum class ActionApplied {
1414}
1515
1616@Suppress(" unused" )
17- inline fun ExtensionAware.whenKotlinIsAtLeast (
17+ inline fun ExtensionAware.whenKotlinCompilerIsAtLeast (
1818 major : Int ,
1919 minor : Int ,
2020 patch : Int = 0,
2121 action : () -> Unit = {},
2222): ActionApplied {
23- val kotlinVersion : KotlinVersion by extra
23+ val kotlinCompilerVersion : KotlinVersion by extra
2424
25- if (kotlinVersion .isAtLeast(major, minor, patch)) {
25+ if (kotlinCompilerVersion .isAtLeast(major, minor, patch)) {
2626 action()
2727
2828 return ActionApplied .Applied
@@ -31,6 +31,7 @@ inline fun ExtensionAware.whenKotlinIsAtLeast(
3131 return ActionApplied .NotApplied
3232}
3333
34+ @Suppress(" unused" )
3435inline fun ExtensionAware.whenKotlinLatest (action : () -> Unit ): ActionApplied {
3536 val isLatestKotlinVersion: Boolean by extra
3637
You can’t perform that action at this time.
0 commit comments