fix(android): apply the kotlin plugin in the android module - #365
Open
bschmalb-ksta wants to merge 1 commit into
Open
bschmalb-ksta wants to merge 1 commit into
bschmalb-ksta wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.