commit | 1199f131d4458cc6ee68465caf8a956cf70386fc | [log] [tgz] |
---|---|---|
author | stuartmorgan <stuartmorgan@google.com> | Fri Jul 09 16:38:13 2021 -0700 |
committer | GitHub <noreply@github.com> | Fri Jul 09 19:38:13 2021 -0400 |
tree | 581cb22cd5cfecdb470cf489655ce2dd6613c34e | |
parent | 731b93d52e792e782e47d3bdcd237cd2138e56ad [diff] |
[flutter_plugin_tools] Make unit tests pass on Windows (#4149) The purpose of this PR is to make running all unit tests on Windows pass (vs failing a large portion of the tests as currently happens). This does not mean that the commands actually work when run on Windows, or that Windows support is tested, only that it's possible to actually run the tests themselves. This is prep for actually supporting parts of the tool on Windows in future PRs. Major changes: - Make the tests significantly more hermetic: - Make almost all tools take a `Platform` constructor argument that can be used to inject a mock platform to control what OS the command acts like it is running on under test. - Add a path `Context` object to the base command, whose style matches the `Platform`, and use that almost everywhere instead of the top-level `path` functions. - In cases where Posix behavior is always required (such as parsing `git` output), explicitly use the `posix` context object for `path` functions. - Start laying the groundwork for actual Windows support: - Replace all uses of `flutter` as a command with a getter that returns `flutter` or `flutter.bat` as appropriate. - For user messages that include relative paths, use a helper that always uses Posix-style relative paths for consistent output. This bumps the version since quite a few changes have built up, and having a cut point before starting to make more changes to the commands to support Windows seems like a good idea. Part of https://github.com/flutter/flutter/issues/86113
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.
Please file any issues, bugs, or feature requests in the main flutter repo.
Issues pertaining to this repository are labeled “plugin”.
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.
These are the available plugins in this repository.
The following plugins are also part of this repository, but are deprecated in favor of the Flutter Community Plus versions.
Plugin | Pub | Replacement | Pub | |
---|---|---|---|---|
android_alarm_manager | android_alarm_manager_plus | |||
android_intent | android_intent_plus | |||
battery | battery_plus | |||
connectivity | connectivity_plus | |||
device_info | device_info_plus | |||
package_info | package_info_plus | |||
sensors | sensors_plus | |||
share | share_plus | |||
wifi_info_flutter | network_info_plus |