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
7
7
import util.enableContextParameters
8
8
import util.otherwise
9
9
import util.whenForIde
10
- import util.whenKotlinIsAtLeast
10
+ import util.whenKotlinCompilerIsAtLeast
11
11
12
12
plugins {
13
13
alias(libs.plugins.conventions.jvm)
@@ -69,7 +69,7 @@ tasks.jar {
69
69
kotlin {
70
70
explicitApi = ExplicitApiMode .Disabled
71
71
72
- rootProject.whenKotlinIsAtLeast (2 , 2 , 0 ) {
72
+ rootProject.whenKotlinCompilerIsAtLeast (2 , 2 , 0 ) {
73
73
enableContextParameters()
74
74
}
75
75
}
Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ enum class ActionApplied {
14
14
}
15
15
16
16
@Suppress(" unused" )
17
- inline fun ExtensionAware.whenKotlinIsAtLeast (
17
+ inline fun ExtensionAware.whenKotlinCompilerIsAtLeast (
18
18
major : Int ,
19
19
minor : Int ,
20
20
patch : Int = 0,
21
21
action : () -> Unit = {},
22
22
): ActionApplied {
23
- val kotlinVersion : KotlinVersion by extra
23
+ val kotlinCompilerVersion : KotlinVersion by extra
24
24
25
- if (kotlinVersion .isAtLeast(major, minor, patch)) {
25
+ if (kotlinCompilerVersion .isAtLeast(major, minor, patch)) {
26
26
action()
27
27
28
28
return ActionApplied .Applied
@@ -31,6 +31,7 @@ inline fun ExtensionAware.whenKotlinIsAtLeast(
31
31
return ActionApplied .NotApplied
32
32
}
33
33
34
+ @Suppress(" unused" )
34
35
inline fun ExtensionAware.whenKotlinLatest (action : () -> Unit ): ActionApplied {
35
36
val isLatestKotlinVersion: Boolean by extra
36
37
You can’t perform that action at this time.
0 commit comments