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
flutter.gradle: collect list of Android plugins from .flutter-plugins-dependencies #57907
Conversation
a8d96f0
to
02c3666
Compare
@blasten Did you already do something similar to this? |
02c3666
to
56af07c
Compare
/cc @cyanglaz Could you take a look at this? |
@blasten might have the most context and knowledge on this. |
LGTM! Thank you |
Properties androidPlugins = new Properties() | ||
allPlugins.each { name, path -> | ||
if (doesSupportAndroidPlatform(path)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@igorakkerman this check should be preventing the issue that you are describing. I have created a new app and imported shared_preferences
, I don't see this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blasten Indeed, I could not reproduce the issue with the current shared_preferences
package, sorry for that. But I do get the message with location
and firebase_core
.
I created a flutter project where the issue appears: https://github.com/igorakkerman/flutter_57907_example
> flutter clean
Deleting build... 319ms
Deleting .dart_tool... 7ms
Deleting Generated.xcconfig... 2ms
Deleting flutter_export_environment.sh... 1ms
> flutter pub get
Running "flutter pub get" in flutter_57907_example... 1,2s
> flutter run
Using hardware rendering with device Android SDK built for x86 64. If you get graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib\main.dart on Android SDK built for x86 64 in debug mode...
Plugin project :firebase_core_web not found. Please update settings.gradle.
Plugin project :location_web not found. Please update settings.gradle.
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 38,0s
√ Built build\app\outputs\flutter-apk\app-debug.apk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to reopen this PR again (It got rolled back). It's good to remove any reference to .flutter-plugins in the plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ncies (flutter#57907)" (flutter#58732) This reverts commit 253eb1c.
Description
Some packages include transitive dependencies to their web version, e.g.
shared_preferences -> shared_preferences_webPR #54407 introduced a change to the default
settings.gradle
file. The required plugins are now loaded throughapp_plugin_loader.gradle
, which retrieves the list from.flutter-plugins-dependencies
. Instead, the current logic influtter.gradle
still relies on.flutter-plugins
, which lists transitive non-Android plugins.This leads to a warning in the build:
The pull request now uses the same logic as in
app_plugin_loader.gradle
to retrieve the list of Android plugins.Note: The same logic now exists in 3 different locations and should be extracted to a separate file. The 3 locations are:
Related Issues
#55827
#57863
Tests
Please help me understand if / where to add tests for the changes. Thank you!
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.