Skip to content

Commit 6c67016

Browse files
Merge pull request #333 from bernardladenthin/claude/agp9-builtin-kotlin-fix-q3m8vz
Remove org.jetbrains.kotlin.android plugin for AGP 9 built-in Kotlin support
2 parents 0f20a1b + cbbfe6e commit 6c67016

3 files changed

Lines changed: 18 additions & 9 deletions

File tree

CLAUDE.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,11 +1652,16 @@ compiles/loads the API); this one has a UI and is driven end-to-end. The name is
16521652
domain is the only string that must be globally unique.
16531653
16541654
Structure (mirrors the consumer-test's plumbing):
1655-
- **`settings.gradle.kts`** — `rootProject.name = "android-llmservice"`; pins AGP `9.2.0` + Kotlin
1656-
`2.4.0` + the Compose plugin; `mavenLocal()` first so the freshly-built AAR + façade resolve there
1657-
in CI (Maven Central for real users). AGP 9.x requires Gradle >= 9.4.1 and JDK 17+; CI already
1658-
runs JDK 21 everywhere (`env.JAVA_VERSION`), so only the `gradle-version` pin on the jobs that
1659-
build this project (and the `.github/android-consumer-test` fixture) needed bumping.
1655+
- **`settings.gradle.kts`** — `rootProject.name = "android-llmservice"`; pins AGP `9.2.0` + the
1656+
Compose compiler plugin (`2.4.0`); `mavenLocal()` first so the freshly-built AAR + façade
1657+
resolve there in CI (Maven Central for real users). AGP 9.x requires Gradle >= 9.4.1 and
1658+
JDK 17+; CI already runs JDK 21 everywhere (`env.JAVA_VERSION`), so only the `gradle-version`
1659+
pin on the jobs that build this project (and the `.github/android-consumer-test` fixture)
1660+
needed bumping. AGP 9.0+ has **built-in Kotlin support** (a runtime dependency on Kotlin
1661+
Gradle plugin 2.2.10+), so the standalone `org.jetbrains.kotlin.android` plugin is no longer
1662+
applied — applying it now fails the build with "no longer required for Kotlin support since
1663+
AGP 9.0" (`app/build.gradle.kts` line 7). The Compose compiler plugin still applies
1664+
separately and its 2.4.0 pin exceeds AGP's 2.2.10 floor, so no other version changed.
16601665
- **`app/build.gradle.kts`** — `namespace`/`applicationId` `net.ladenthin.android.llmservice`,
16611666
`minSdk 28` (AAR floor), `compileSdk/targetSdk 35`, Jetpack Compose, `androidx.appcompat` (only for
16621667
the per-app language API), ABIs `arm64-v8a` + `x86_64`. Depends on `net.ladenthin:llama-android` +

android-llmservice/app/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
66

77
plugins {
88
id("com.android.application")
9-
id("org.jetbrains.kotlin.android")
9+
// AGP 9.0+ built-in Kotlin support replaces the standalone kotlin-android plugin —
10+
// see the note in settings.gradle.kts.
1011
id("org.jetbrains.kotlin.plugin.compose")
1112
}
1213

android-llmservice/settings.gradle.kts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ pluginManagement {
1414
gradlePluginPortal()
1515
}
1616
// Versions pinned here (KISS: no version catalog). AGP matches the consumer-test
17-
// fixture; Kotlin matches llama-kotlin (2.4.0). AGP 9.x requires Gradle >= 9.4.1 —
18-
// see the gradle-version pins on the CI jobs that build this project in publish.yml.
17+
// fixture. AGP 9.x requires Gradle >= 9.4.1 — see the gradle-version pins on the CI
18+
// jobs that build this project in publish.yml. AGP 9.0+ has built-in Kotlin support
19+
// (runtime dependency on Kotlin Gradle plugin 2.2.10+), so the standalone
20+
// org.jetbrains.kotlin.android plugin is no longer applied/needed — see
21+
// https://developer.android.com/build/migrate-to-built-in-kotlin. The Compose
22+
// compiler plugin (2.4.0) still applies separately and exceeds AGP's 2.2.10 floor.
1923
plugins {
2024
id("com.android.application") version "9.2.0"
21-
id("org.jetbrains.kotlin.android") version "2.4.0"
2225
id("org.jetbrains.kotlin.plugin.compose") version "2.4.0"
2326
}
2427
}

0 commit comments

Comments
 (0)