diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index a89a5f50..5d5df87d 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -1,9 +1,9 @@ plugins { alias(libs.plugins.android.application) - // kotlin-android removed: AGP 9.0+ auto-enables Kotlin via the - // android.builtInKotlin=true default. The serialization + compose-compiler - // plugins still need explicit application because they're language-level - // (Kotlin compiler) plugins beyond what built-in Kotlin provides. + // kotlin-android applied explicitly: AGP 9's built-in Kotlin path is + // not compatible with KSP yet. Opted out via + // android.builtInKotlin=false in gradle.properties. + alias(libs.plugins.kotlin.android) alias(libs.plugins.kotlin.serialization) alias(libs.plugins.compose.compiler) alias(libs.plugins.ksp) diff --git a/android/build.gradle.kts b/android/build.gradle.kts index d8425a47..b3c00232 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -1,9 +1,9 @@ plugins { alias(libs.plugins.android.application) apply false - // kotlin-android plugin no longer needed: AGP 9.0+ auto-enables via - // android.builtInKotlin=true (default). Kept the serialization + - // compose-compiler plugins, which are language-level (Kotlin compiler) - // plugins still applied explicitly per module. + // kotlin-android needed despite AGP 9's built-in Kotlin: KSP isn't + // compatible with the builtInKotlin path yet, so we opt out via + // android.builtInKotlin=false in gradle.properties. + alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.serialization) apply false alias(libs.plugins.ksp) apply false alias(libs.plugins.hilt) apply false diff --git a/android/gradle.properties b/android/gradle.properties index b605a620..8e0266b4 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -4,4 +4,10 @@ org.gradle.caching=true org.gradle.configuration-cache=true android.useAndroidX=true android.nonTransitiveRClass=true + +# KSP isn't compatible with AGP 9's built-in Kotlin support (the +# `android.builtInKotlin=true` default). Opt out so we can apply the +# explicit kotlin-android plugin and KSP together. Revisit when KSP +# adds built-in-Kotlin support. +android.builtInKotlin=false kotlin.code.style=official