Skip to content

fix(android): apply the kotlin plugin in the android module - #365

Open
bschmalb-ksta wants to merge 1 commit into
thekorn:mainfrom
ksta-medien:fix/apply-the-kotlin-plugin
Open

bschmalb-ksta wants to merge 1 commit into
thekorn:mainfrom
ksta-medien:fix/apply-the-kotlin-plugin

Conversation

@bschmalb-ksta

Copy link
Copy Markdown

The android module has a top-level kotlin { compilerOptions { ... } } block but no longer applies kotlin-android, so that extension only exists where the flutter tool applies the kotlin plugin to plugin projects by itself. On a flutter version that does not, evaluating the project fails with "Could not find method kotlin() for arguments ... on project ':sourcepoint_unified_cmp_android'" and the app cannot be built at all. We hit this on flutter 3.41; the example app builds because 3.44 applies it.

0.2.1 still carried both the buildscript classpath and the apply, so this restores them and keeps the newer compilerOptions block.

Tested by building our own app on an android emulator on flutter 3.41, which fails on main and succeeds with this, and by building the example app on 3.44, which is unaffected.

The module has a top-level `kotlin { compilerOptions { ... } }` block but
stopped applying `kotlin-android`, so the extension only exists where the
flutter tool applies the kotlin plugin to plugin projects on its own. On a
flutter version that does not, evaluating the project fails with "Could
not find method kotlin()" and the app cannot be built at all.

0.2.1 still carried both the classpath and the apply, so this restores
them and keeps the newer compilerOptions block.
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