Upgrade Kotlin to 2.1.20 and adopt the Compose Compiler Gradle plugin#196
Open
dipenpradhan wants to merge 3 commits into
Open
Upgrade Kotlin to 2.1.20 and adopt the Compose Compiler Gradle plugin#196dipenpradhan wants to merge 3 commits into
dipenpradhan wants to merge 3 commits into
Conversation
- Replace kotlin-kapt with com.google.devtools.ksp in the app module
and the common-kotlin convention plugin
- Add Room compiler via the ksp configuration instead of kapt
- Drop the kapt { correctErrorTypes = true } workaround
- Add symbol-processing-gradle-plugin (1.9.22-1.0.17) to buildSrc
Fixes Gurupreet#184
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Bump kotlin-gradle-plugin 1.9.22 -> 2.1.20 (root + buildSrc) - Adopt the new Compose Compiler Gradle plugin (org.jetbrains.kotlin.plugin.compose) in app and convention plugins - Drop composeCompiler version constant and composeOptions blocks - Replace removed -Xopt-in flag with -opt-in - Bump KSP to 2.1.20-1.0.31 to match Kotlin Fixes Gurupreet#182 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Gurupreet
approved these changes
Jun 6, 2026
ktfmt-gradle 0.12.0 fails with 'Generic error during file processing' once Kotlin 2.x is on the buildscript classpath. 0.22.0 supports Kotlin 2.x and also formats *.kts build scripts, hence the repo-wide reformat (no functional changes). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades Kotlin from 1.9.22 to 2.1.20 (K2 compiler), as proposed in #182.
Versions.kt/ root &buildSrcbuild scripts:kotlin-gradle-plugin1.9.22 → 2.1.20org.jetbrains.kotlin.plugin.compose), which ships with Kotlin 2.0+ — applied inappand in both convention plugins (common-compose-…andcommon-kotlin-…)composeCompilerversion constant,ProjectConfigs.kotlinCompilerExtensionVersion, and allcomposeOptions { kotlinCompilerExtensionVersion = … }blocks-Xopt-incompiler flag with its stable spelling-opt-in2.1.20-1.0.31to match the Kotlin versionWhy KSP had to come first
This PR stacks on #195 (KAPT → KSP): Room 2.6.1's KAPT path uses a
kotlinx-metadata-jvmthat only reads metadata up to 2.0.0 and fails against Kotlin 2.1-compiled classes (Provided Metadata instance has version 2.1.0…). Room's KSP processor has no such limitation.Closes #182
Verification
./gradlew assembleDebug testDebugUnitTestpasses locally (JDK 17, SDK 34)./gradlew buildon this PRMerge order
PR 2 of the stacked series (#182–#193, #13, #68). Depends on #195 — its diff includes #195's commit until that merges.
🤖 Generated with Claude Code
cc @Gurupreet for review