Commit f6dfe1c
fix(device_info_plus): apply KGP unless built-in Kotlin is enabled
The guard assumed AGP 9 always means built-in Kotlin is active. AGP enables
built-in Kotlin only when android.builtInKotlin is not explicitly false, and
`flutter create` writes android.builtInKotlin=false into every new app.
On AGP 9 with android.builtInKotlin=false, the plugin skipped KGP and AGP
provided no Kotlin either, so nothing compiled the plugin's Kotlin sources and
configuration failed at the KotlinAndroidProjectExtension lookup. This was
masked only because Flutter's kgpRegexKotlin does not match the imperative
apply(plugin = "...") form, so Flutter applied KGP as a fallback on the
plugin's behalf.
Guard on the same condition AGP itself uses: built-in Kotlin is on when
AGP >= 9 and android.builtInKotlin is not explicitly false.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 13e1704 commit f6dfe1c
1 file changed
Lines changed: 7 additions & 1 deletion
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| |||
0 commit comments