Files
GameTime/android
Blomios f140d7a014 fix(android): apply Kotlin plugin to file_picker on AGP 9
file_picker's android/build.gradle guards `apply plugin:
'org.jetbrains.kotlin.android'` behind a runtime AGP-version check that
is false on this project's AGP 9 (it assumes AGP's built-in Kotlin
support is active instead). Flutter's own FlutterPluginUtils only
scans the file's text for that apply statement to decide whether to
auto-apply Kotlin itself, so it is fooled by the same guarded line and
skips applying it too. With android.builtInKotlin=false (needed for
other plugins like audioplayers_android), no Kotlin plugin ever runs
for file_picker, so its Kotlin sources -- including FilePickerPlugin --
never compile, breaking `flutter build apk --release` with:

  cannot find symbol: class FilePickerPlugin

Force-apply org.jetbrains.kotlin.android for the file_picker subproject
once AGP's library plugin is present, and pin its Kotlin compile
jvmTarget to 17 (file_picker's own jvmTarget setup is behind the same
dead guard, so it would otherwise default to the running JDK's target
and conflict with the javac target). Verified with a full
`flutter build apk --release`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 18:30:18 +02:00
..