Skip to content

Commit 41dcf45

Browse files
BoDAnkamartinbonninAnkaAnka
authored
Bump Kotlin to 2.2.20 (#6716)
* Add Kotlin Dev and Maven Central Snapshots repositories * Suppress "Language version 1.9 is deprecated and its support will be removed in a future version of Kotlin" * Fix "Supertypes through typealias cannot be nullable. This will become an error in language version 2.3." * Fix "The corresponding parameter in the supertype 'SubscriptionParser' is named 'response'. This may cause problems when calling this function with named arguments." * Use compilerOptions instead of deprecated kotlinOptions * Publish only the release variant Fixes a warning. The debug and release versions should be the same anyways. * Bump kotlin-compiletesting to 0.8.0 * Suppress opt-in usage warnings in wasmJs files * Bump Kotlin and KSP * Update package-lock.json * Bump Kotlin and KSP * Update bump script to use 2.2.20-RC* * Update bump script to update lock files * Bump Kotlin and KSP to 2.2.20 * Use Apollo's KSP fork * Revert "Use Apollo's KSP fork" This reverts commit 26760fb. * Use KSP 2.2.20-2.0.3 and don't use Kotlin "dev" repository * Add explicit dependencies on kspKotlin task (cherry picked from commit 2d2670e) * Add a comment about google/ksp#2599 (cherry picked from commit 520d84e) * Update package-lock.json * keep Gradle tests unchanged * Fix kotlin-test version * Update API dump --------- Co-authored-by: Anka <[email protected]> Co-authored-by: Martin Bonnin <[email protected]> Co-authored-by: Anka <[email protected]> Co-authored-by: Anka <[email protected]> Co-authored-by: Anka <[email protected]>
1 parent f202698 commit 41dcf45

File tree

24 files changed

+2300
-2534
lines changed

24 files changed

+2300
-2534
lines changed

build-logic/src/main/kotlin/CompilerOptions.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1+
12
import com.android.build.gradle.BaseExtension
23
import compat.patrouille.configureJavaCompatibility
34
import compat.patrouille.configureKotlinCompatibility
4-
import org.gradle.api.JavaVersion
55
import org.gradle.api.Project
6-
import org.gradle.api.plugins.JavaPluginExtension
7-
import org.gradle.api.tasks.compile.JavaCompile
86
import org.gradle.api.tasks.testing.Test
97
import org.gradle.jvm.toolchain.JavaLanguageVersion
108
import org.gradle.jvm.toolchain.JavaToolchainService
11-
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
129
import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension
1310
import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions
1411
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompilerOptions
@@ -28,6 +25,9 @@ fun KotlinCommonCompilerOptions.configure(
2825
) {
2926
freeCompilerArgs.add("-Xexpect-actual-classes")
3027

28+
// Suppress "Language version 1.9 is deprecated and its support will be removed in a future version of Kotlin"
29+
freeCompilerArgs.add("-Xsuppress-version-warnings")
30+
3131
optIns.forEach {
3232
freeCompilerArgs.add("-opt-in=$it")
3333
}

build-logic/src/main/kotlin/Mpp.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fun defaultTargets(
7171

7272
if (withAndroid) {
7373
androidTarget {
74-
publishAllLibraryVariants()
74+
publishLibraryVariants("release")
7575
}
7676
}
7777

gradle/libraries.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ javaPoet = "1.13.0"
2929
jetbrains-annotations = "26.0.2-1"
3030
junit = "4.13.2"
3131
#noinspection GradleDependency,NewerVersionAvailable compatibility with native consumers
32-
kotlin-plugin = "2.1.21"
32+
kotlin-plugin = "2.2.20"
3333
kotlinx-coroutines = "1.10.2"
3434
kotlinx-datetime = "0.7.1"
3535
#noinspection NewerVersionAvailable requires KGP 2.2
3636
kotlinx-serialization-runtime = "1.8.1"
3737
#noinspection GradleDependency,NewerVersionAvailable compatibility with native consumers
38-
ksp = "2.1.21-2.0.1"
38+
ksp = "2.2.20-2.0.3"
3939
#noinspection NewerVersionAvailable requires KGP 2.2
4040
ktor = "3.2.3"
4141
moshix = "0.14.1"
@@ -203,4 +203,4 @@ kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "ko
203203
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin-plugin" }
204204
android-application = { id = "com.android.application", version.ref = "android-plugin" }
205205
android-library = { id = "com.android.library", version.ref = "android-plugin" }
206-
android-kmp-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "android-plugin"}
206+
android-kmp-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "android-plugin"}

gradle/test.settings.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ dependencyResolutionManagement {
1010
}
1111
pluginManagement {
1212
listOf(repositories, dependencyResolutionManagement.repositories).forEach {
13+
// Uncomment this one to use the Kotlin "dev" repository
14+
// it.maven("https://redirector.kotlinlang.org/maven/dev/")
1315
it.mavenCentral()
1416
it.google()
1517
it.maven("../../../../build/localMaven")
1618
}
17-
}
19+
}

0 commit comments

Comments
 (0)