Skip to content

Commit e548509

Browse files
authored
Upgrade to Kotlin 2.1.20 (#4420)
The block applying `kotlin("multiplatform")` had to be moved above the block applying animalsniffer, because since 2.1.20, the Multiplatform plugin applies `java-base`, and the animalsniffer plugin is not prepared for this order of plugin applications, always assuming that the Multiplatform plugin goes before the Java plugin: https://github.com/xvik/gradle-animalsniffer-plugin/blob/cbcb2d524dacba651cac183216cbefcdcf629a3a/src/main/groovy/ru/vyarus/gradle/plugin/animalsniffer/AnimalSnifferPlugin.groovy#L81 See xvik/gradle-animalsniffer-plugin#116 Thanks to @ALikhachev for investigating the issue!
1 parent fdec0de commit e548509

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

build.gradle.kts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,18 @@ allprojects {
9494
}
9595
}
9696

97+
configure(subprojects.filter { !sourceless.contains(it.name) }) {
98+
if (isMultiplatform) {
99+
apply(plugin = "kotlin-multiplatform")
100+
apply(plugin = "kotlin-multiplatform-conventions")
101+
} else if (platformOf(this) == "jvm") {
102+
apply(plugin = "kotlin-jvm-conventions")
103+
} else {
104+
val platform = platformOf(this)
105+
throw IllegalStateException("No configuration rules for $platform")
106+
}
107+
}
108+
97109
// needs to be before evaluationDependsOn due to weird Gradle ordering
98110
configure(subprojects) {
99111
fun Project.shouldSniff(): Boolean =
@@ -109,18 +121,6 @@ configure(subprojects) {
109121
}
110122
}
111123

112-
configure(subprojects.filter { !sourceless.contains(it.name) }) {
113-
if (isMultiplatform) {
114-
apply(plugin = "kotlin-multiplatform")
115-
apply(plugin = "kotlin-multiplatform-conventions")
116-
} else if (platformOf(this) == "jvm") {
117-
apply(plugin = "kotlin-jvm-conventions")
118-
} else {
119-
val platform = platformOf(this)
120-
throw IllegalStateException("No configuration rules for $platform")
121-
}
122-
}
123-
124124
configure(subprojects.filter { !sourceless.contains(it.name) && it.name != testUtilsModule }) {
125125
if (isMultiplatform) {
126126
configure<KotlinMultiplatformExtension> {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Kotlin
22
version=1.10.2-SNAPSHOT
33
group=org.jetbrains.kotlinx
4-
kotlin_version=2.1.0
4+
kotlin_version=2.1.20
55
# DO NOT rename this property without adapting kotlinx.train build chain:
66
atomicfu_version=0.26.1
77
benchmarks_version=0.4.13

0 commit comments

Comments
 (0)