Automatically wire dependencies for native plugins#8891
Automatically wire dependencies for native plugins#8891jakobr-google merged 4 commits intoflutter:masterfrom
Conversation
There was a problem hiding this comment.
Does localEngineOut refer to the --local-engine argument? Then perhaps rename it in the error message.
There was a problem hiding this comment.
Not directly. -PlocalEngineOut (passed to the Gradle build by Flutter Tools) is the full path to the chosen local engine directory, which is a combination of --local-engine-src-path and --local-engine. If you don't specify --local-engine-src-path, it defaults to $FLUTTER_ROOT/../engine/src, but the Gradle build script has no idea about that. It just gets the resolved path.
Flutter Tools will have verified the --local-engine argument before passing it to Gradle, so you should only see this if you manually specify -PlocalEngineOut to gradle. Or, you know, Gremlins.
|
I presume this is just some plumbing before the later patches which use this? :) |
mit-mit
left a comment
There was a problem hiding this comment.
LGTM with a few small nit-level comments
There was a problem hiding this comment.
Removed message.
There was a problem hiding this comment.
Maybe change to .flutter-plugins to 1) make it clear you should not edit it, and 2) suggest it's generated.
There was a problem hiding this comment.
Also add this file to .gitignore
|
@eseidelGoogle yep! With this PR, everything should be in place to consume plugins. Next up will be the "new plugin" template. |
Reads in a mapping of plugin name to path from flutter-plugins.properties, if that file exists. Plugins are automatically added as dependent projects of the app, and get a dependency on flutter.jar.
Go through all packages brought in by pub, and write the name and path of every one that is a flutter plugin into flutter-plugins.properties. Update the iOS template Podspec to automatically add pods from flutter-plugins.properties.
84bf1a5 to
f748b6a
Compare
Go through all packages brought in by pub, and write the name and path of every package that is a flutter plugin into flutter-plugins.properties. A package is a plugin if the
pubspec.yamlfile has aflutter:section containing aplugin:section:The plugin section is currently empty. The
flutter-plugins.propertiesfile is updated on every build.Updated Gradle and Podspec in the new project template to read in flutter-plugins.properties and automatically add dependencies on their native code.