[flutter_plugin_tools] Add a new base command for looping over packages (#4067)

Most of our commands are generally of the form:
```
  for (each plugin as defined by the tool flags)
    check some things for success or failure
  print a summary all of the failing things
  exit non-zero if anything failed
```

Currently all that logic not consistent, having been at various points copied and pasted around, modified, in some cases rewritten. There's unnecessary boilerplate in each new command, and there's unnecessary variation that makes it harder both to maintain the tool, and to consume the test output:
- There's no standard format for separating each plugin's run to search within a log
- There's no standard format for the summary at the end
- In some cases commands have been written to ToolExit on failure, which means we don't actually get the rest of the runs

This makes a new base class for commands that follow this structure to use, with shared code for all the common bits. This makes it harder to accidentally write new commands incorrectly, easier to maintain the code, and lets us standardize output so that searching within large logs will be easier.

This ports two commands over as a proof of concept to demonstrate that it works; more will be converted in follow-ups.

Related to https://github.com/flutter/flutter/issues/83413
9 files changed
tree: 02ad7fdfd9940ead628dd3fdb35b8c0220aa8959
  1. .ci/
  2. .github/
  3. .opensource/
  4. packages/
  5. script/
  6. .ci.yaml
  7. .cirrus.yml
  8. .clang-format
  9. .gitattributes
  10. .gitignore
  11. analysis_options.yaml
  12. analysis_options_legacy.yaml
  13. AUTHORS
  14. CODEOWNERS
  15. CONTRIBUTING.md
  16. FlutterFire.md
  17. LICENSE
  18. README.md
README.md

Flutter plugins

Build Status

This repo is a companion repo to the main flutter repo. It contains the source code for Flutter first-party plugins (i.e., plugins developed by the core Flutter team). Check the packages directory for all plugins.

Flutter plugins enable access to platform-specific APIs. For more information about plugins, and how to use them, see https://flutter.dev/platform-plugins/.

These plugins are also available on pub.

Issues

Please file any issues, bugs, or feature requests in the main flutter repo.

Issues pertaining to this repository are labeled “plugin”.

Contributing

If you wish to contribute a new plugin to the Flutter ecosystem, please see the documentation for developing packages and platform channels. You can store your plugin source code in any GitHub repository (the present repo is only intended for plugins developed by the core Flutter team). Once your plugin is ready you can publish to the pub repository.

If you wish to contribute a change to any of the existing plugins in this repo, please review our contribution guide, and send a pull request.

Plugins

These are the available plugins in this repository.

PluginPubPointsPopularityLikes
camerapub packagepub pointspopularitylikes
espressopub packagepub pointspopularitylikes
flutter_plugin_android_lifecyclepub packagepub pointspopularitylikes
google_maps_flutterpub packagepub pointspopularitylikes
google_sign_inpub packagepub pointspopularitylikes
image_pickerpub packagepub pointspopularitylikes
in_app_purchasepub packagepub pointspopularitylikes
ios_platform_imagespub packagepub pointspopularitylikes
local_authpub packagepub pointspopularitylikes
path_providerpub packagepub pointspopularitylikes
plugin_platform_interfacepub packagepub pointspopularitylikes
quick_actionspub packagepub pointspopularitylikes
shared_preferencespub packagepub pointspopularitylikes
url_launcherpub packagepub pointspopularitylikes
video_playerpub packagepub pointspopularitylikes
webview_flutterpub packagepub pointspopularitylikes

Deprecated

The following plugins are also part of this repository, but are deprecated in favor of the Flutter Community Plus versions.

PluginPubReplacementPub
android_alarm_managerpub packageandroid_alarm_manager_pluspub package
android_intentpub packageandroid_intent_pluspub package
batterypub packagebattery_pluspub package
connectivitypub packageconnectivity_pluspub package
device_infopub packagedevice_info_pluspub package
package_infopub packagepackage_info_pluspub package
sensorspub packagesensors_pluspub package
sharepub packageshare_pluspub package
wifi_info_flutterpub packagenetwork_info_pluspub package