-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example apps are broken if they use the old version of settings.gradle #98048
Comments
Migration tool will be able to handle this case. |
Is this important enough to revert #97823 for now? It seems that it is more common for apps to use legacy settings.gradle than use iOS only plugins |
yes, let's revert it for now, and reland after the migration tool lands. |
It's more of an edge case than that; it's using a plugin that doesn't support Android but has an android/ folder. (Most likely due to sloppy updating of a plugin that used to have a dummy Android implementation since that used to be required.) |
The revert #98050 was landed. Is there still an open task that this issue is tracking? (I see that when the revert landed, the issue was lowered in priority but kept open: #98048 (comment) ) |
It may have been intended to track getting to the point where we can reland that change, but since the original issue is still open I don't think we need it. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Relands #97823 When the tool migrated to `.flutter-plugins-dependencies`, the Gradle plugin was never changed. Until now, the plugin had the heuristic that a plugin with a `android/build.gradle` file supported the Android platform. Also applies schema of `getPluginDependencies` to `getPluginList` which uses a `List` of Object instead of `Properties`. Fixes #97729 Cause of the error: https://github.com/flutter/flutter/blob/5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c/packages/flutter_tools/gradle/flutter.gradle#L421C25-L421C25 Fixes #98048 The deprecated line `include ":$name"` in `settings.gradle` (pluginEach) in old projects causes the `project.rootProject.findProject` to also find the plugin "project", so it is not failing on the `afterEvaluate` method. But the plugin shouldn't be included in the first place as it fails with `Could not find method implementation() for arguments` error in special cases. Related to #48918, see [_writeFlutterPluginsListLegacy](https://github.com/flutter/flutter/blob/27bc1cf61a5b54bf655062be63050123abb617e4/packages/flutter_tools/lib/src/flutter_plugins.dart#L248). Co-authored-by: Emmanuel Garcia <egarciad@google.com>
Relands flutter#97823 When the tool migrated to `.flutter-plugins-dependencies`, the Gradle plugin was never changed. Until now, the plugin had the heuristic that a plugin with a `android/build.gradle` file supported the Android platform. Also applies schema of `getPluginDependencies` to `getPluginList` which uses a `List` of Object instead of `Properties`. Fixes flutter#97729 Cause of the error: https://github.com/flutter/flutter/blob/5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c/packages/flutter_tools/gradle/flutter.gradle#L421C25-L421C25 Fixes flutter#98048 The deprecated line `include ":$name"` in `settings.gradle` (pluginEach) in old projects causes the `project.rootProject.findProject` to also find the plugin "project", so it is not failing on the `afterEvaluate` method. But the plugin shouldn't be included in the first place as it fails with `Could not find method implementation() for arguments` error in special cases. Related to flutter#48918, see [_writeFlutterPluginsListLegacy](https://github.com/flutter/flutter/blob/27bc1cf61a5b54bf655062be63050123abb617e4/packages/flutter_tools/lib/src/flutter_plugins.dart#L248). Co-authored-by: Emmanuel Garcia <egarciad@google.com>
After #97823, some builds break if the app uses the older version of settings.gradle.
For example, webview_flutter_android:
This can be fixed by updating settings.gradle to the latest version:
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/app_shared/android.tmpl/settings.gradle
cc @GaryQian for the migration tool
cc @stuartmorgan
The text was updated successfully, but these errors were encountered: