From 2dcaffcdf6a5606c7b29daa8cb242c506972c5d9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 07:29:34 +0000 Subject: [PATCH 1/2] Update kotlin --- gradle/libs.versions.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5ede6519a9..12074b22f5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,9 +5,9 @@ # Project android_gradle_plugin = "9.3.2" # When updating this, please also update the version in the file ./idea/kotlinc.xml -kotlin = "2.4.10" +kotlin = "2.4.20" kotlinpoet = "2.4.0" -ksp = "2.3.11" +ksp = "2.3.12" firebaseAppDistribution = "5.3.0" # AndroidX From cb19232e5ac8ee32b183a122c58ba5aa1b5cda43 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 1 Oct 2026 16:45:18 +0200 Subject: [PATCH 2/2] Fix compilation warnings after Kotlin 2.4.20 and KSP 2.3.12 upgrade - Update .idea/kotlinc.xml to Kotlin 2.4.20. - Remove `-Xannotation-default-target=first-only`: the new annotation default target rule is stable in Kotlin 2.4, and disabling it now produces a CLI_ARG_DISABLES_STABLE_FEATURE warning. - Replace deprecated `KSNode.validate()` with `validate(enableNewFeatures = false)` to keep the same behavior. Co-Authored-By: Claude Opus 5.5 (1M context) --- .idea/kotlinc.xml | 2 +- build.gradle.kts | 4 ---- .../io/element/android/codegen/ContributesNodeProcessor.kt | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index cc87bc5140..4f368d4513 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -2,6 +2,6 @@ \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index e7a03b403d..11190f7325 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -101,10 +101,6 @@ allprojects { // Uncomment to suppress Compose Kotlin compiler compatibility warning // freeCompilerArgs.addAll(listOf("-P", "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true")) - - // Fix compilation warning for annotations - // See https://youtrack.jetbrains.com/issue/KT-73255/Change-defaulting-rule-for-annotations for more details - freeCompilerArgs.add("-Xannotation-default-target=first-only") } } } diff --git a/codegen/src/main/kotlin/io/element/android/codegen/ContributesNodeProcessor.kt b/codegen/src/main/kotlin/io/element/android/codegen/ContributesNodeProcessor.kt index 3e6c05ad01..854f327665 100644 --- a/codegen/src/main/kotlin/io/element/android/codegen/ContributesNodeProcessor.kt +++ b/codegen/src/main/kotlin/io/element/android/codegen/ContributesNodeProcessor.kt @@ -53,7 +53,7 @@ class ContributesNodeProcessor( val annotatedSymbols = resolver.getSymbolsWithAnnotation(ContributesNode::class.qualifiedName!!) .filterIsInstance() - val (validSymbols, invalidSymbols) = annotatedSymbols.partition { it.validate() } + val (validSymbols, invalidSymbols) = annotatedSymbols.partition { it.validate(enableNewFeatures = false) } if (validSymbols.isEmpty()) return invalidSymbols