Skip to content

fix(android): support built-in Kotlin without raising KGP floor - #49

Closed
fstotz wants to merge 1 commit into
yanncabral:mainfrom
fstotz:codex/apple-packaging-built-in-kotlin
Closed

fstotz wants to merge 1 commit into
yanncabral:mainfrom
fstotz:codex/apple-packaging-built-in-kotlin

Conversation

@fstotz

@fstotz fstotz commented Oct 27, 2026

Copy link
Copy Markdown

Apps enabling AGP 9 built-in Kotlin fail when this plugin unconditionally applies kotlin-android. Apply standalone KGP only on older AGP or when the host explicitly sets android.builtInKotlin=false.

Guard legacy kotlinOptions on that path; built-in Kotlin inherits the existing Java 11 target. Remove the redundant Kotlin directory from the Java source set. Apple packaging and runtime APIs remain unchanged.

Related PR: #47. This implementation addresses the older-KGP compatibility concern in its review: it retains the existing compiler configuration on the legacy path instead of introducing a compilerOptions requirement or raising the SDK floor.

Validated in a Flutter 3.47.7 application using AGP 9.4.1, Gradle 9.6.1, Kotlin 2.4.10 and android.builtInKotlin=true:

  • Staging debug APK built, installed, and launched on a ONEPLUS A6013 (Android 11/API 30).
  • Gradle runtime verification found no standalone org.jetbrains.kotlin.android plugin applied across 35 Android modules.
  • Application static analysis passed; 15 focused recorder, TTS-media, and local-preferences tests passed.

CocoaPods specifications were parsed successfully. Native Apple builds and the legacy-KGP build matrix were not run.

Consumer migration tracking: https://github.com/MEDEL-RD-AppliedAI/redi-app/issues/179.

@fstotz fstotz closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant