Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add plugin tools
  • Loading branch information
Chris Yang committed Jan 27, 2021
commit 2f819d548c4d3ecb4d80f2759134f359b2e27791
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ task:
- flutter channel master
- flutter upgrade
- git fetch origin master
activate_script: pub global activate -s path ./plugin_tools
activate_script: pub global activate -s path ./package/plugin_tools
create_simulator_script:
- xcrun simctl list
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot
Expand Down
288 changes: 288 additions & 0 deletions packages/plugin_tools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,288 @@
## v.0.0.45+1

- Don't call `flutter format` if there are no Dart files to format.

## v.0.0.45

- Add exclude flag to exclude any plugin from further processing.

## v.0.0.44+7

- `all-plugins-app` doesn't override the AGP version.

## v.0.0.44+6

- Fix code formatting.

## v.0.0.44+5

- Remove `-v` flag on drive-examples.

## v.0.0.44+4

- Fix bug where directory isn't passed

## v.0.0.44+3

- More verbose logging

## v.0.0.44+2

- Remove pre-alpha Windows workaround to create examples on the fly.

## v.0.0.44+1

- Print packages that passed tests in `xctest` command.
- Remove printing the whole list of simulators.

## v.0.0.44

- Add 'xctest' command to run xctests.

## v.0.0.43

- Allow minor `*-nullsafety` pre release packages.

## v.0.0.42+1

- Fix test command when `--enable-experiment` is called.

## v.0.0.42

- Allow `*-nullsafety` pre release packages.

## v.0.0.41

- Support `--enable-experiment` flag in subcommands `test`, `build-examples`, `drive-examples`,
and `firebase-test-lab`.

## v.0.0.40

- Support `integration_test/` directory for `drive-examples` command

## v.0.0.39

- Support `integration_test/` directory for `package:integration_test`

## v.0.0.38

- Add C++ and ObjC++ to clang-format.

## v.0.0.37+2

- Make `http` and `http_multi_server` dependency version constraint more flexible.

## v.0.0.37+1

- All_plugin test puts the plugin dependencies into dependency_overrides.

## v.0.0.37

- Only builds mobile example apps when necessary.

## v.0.0.36+3

- Add support for Linux plugins.

## v.0.0.36+2

- Default to showing podspec lint warnings

## v.0.0.36+1

- Serialize linting podspecs.

## v.0.0.36

- Remove retry on Firebase Test Lab's call to gcloud set.
- Remove quiet flag from Firebase Test Lab's gcloud set command.
- Allow Firebase Test Lab command to continue past gcloud set network failures.
This is a mitigation for the network service sometimes not responding,
but it isn't actually necessary to have a network connection for this command.

## v.0.0.35+1

- Minor cleanup to the analyze test.

## v.0.0.35

- Firebase Test Lab command generates a configurable unique path suffix for results.

## v.0.0.34

- Firebase Test Lab command now only tries to configure the project once
- Firebase Test Lab command now retries project configuration up to five times.

## v.0.0.33+1

- Fixes formatting issues that got past our CI due to
https://github.com/flutter/flutter/issues/51585.
- Changes the default package name for testing method `createFakePubspec` back
its previous behavior.

## v.0.0.33

- Version check command now fails on breaking changes to platform interfaces.
- Updated version check test to be more flexible.

## v.0.0.32+7

- Ensure that Firebase Test Lab tests have a unique storage bucket for each test run.

## v.0.0.32+6

- Ensure that Firebase Test Lab tests have a unique storage bucket for each package.

## v.0.0.32+5

- Remove --fail-fast and --silent from lint podspec command.

## v.0.0.32+4

- Update `publish-plugin` to use `flutter pub publish` instead of just `pub
publish`. Enforces a `pub publish` command that matches the Dart SDK in the
user's Flutter install.

## v.0.0.32+3

- Update Firebase Testlab deprecated test device. (Pixel 3 API 28 -> Pixel 4 API 29).

## v.0.0.32+2

- Runs pub get before building macos to avoid failures.

## v.0.0.32+1

- Default macOS example builds to false. Previously they were running whenever
CI was itself running on macOS.

## v.0.0.32

- `analyze` now asserts that the global `analysis_options.yaml` is the only one
by default. Individual directories can be excluded from this check with the
new `--custom-analysis` flag.

## v.0.0.31+1

- Add --skip and --no-analyze flags to podspec command.

## v.0.0.31

- Add support for macos on `DriveExamplesCommand` and `BuildExamplesCommand`.

## v.0.0.30

- Adopt pedantic analysis options, fix firebase_test_lab_test.

## v.0.0.29

- Add a command to run pod lib lint on podspec files.

## v.0.0.28

- Increase Firebase test lab timeouts to 5 minutes.

## v.0.0.27

- Run tests with `--platform=chrome` for web plugins.

## v.0.0.26

- Add a command for publishing plugins to pub.

## v.0.0.25

- Update `DriveExamplesCommand` to use `ProcessRunner`.
- Make `DriveExamplesCommand` rely on `ProcessRunner` to determine if the test fails or not.
- Add simple tests for `DriveExamplesCommand`.

## v.0.0.24

- Gracefully handle pubspec.yaml files for new plugins.
- Additional unit testing.

## v.0.0.23

- Add a test case for transitive dependency solving in the
`create_all_plugins_app` command.

## v.0.0.22

- Updated firebase-test-lab command with updated conventions for test locations.
- Updated firebase-test-lab to add an optional "device" argument.
- Updated version-check command to always compare refs instead of using the working copy.
- Added unit tests for the firebase-test-lab and version-check commands.
- Add ProcessRunner to mock running processes for testing.

## v.0.0.21

- Support the `--plugins` argument for federated plugins.

## v.0.0.20

- Support for finding federated plugins, where one directory contains
multiple packages for different platform implementations.

## v.0.0.19+3

- Use `package:file` for file I/O.

## v.0.0.19+2

- Use java as language when calling `flutter create`.

## v.0.0.19+1

- Rename command for `CreateAllPluginsAppCommand`.

## v.0.0.19

- Use flutter create to build app testing plugin compilation.

## v.0.0.18+2

- Fix `.travis.yml` file name in `README.md`.

## v0.0.18+1

- Skip version check if it contains `publish_to: none`.

## v0.0.18

- Add option to exclude packages from generated pubspec command.

## v0.0.17+4

- Avoid trying to version-check pubspecs that are missing a version.

## v0.0.17+3

- version-check accounts for [pre-1.0 patch versions](https://github.com/flutter/flutter/issues/35412).

## v0.0.17+2

- Fix exception handling for version checker

## v0.0.17+1

- Fix bug where we used a flag instead of an option

## v0.0.17

- Add a command for checking the version number

## v0.0.16

- Add a command for generating `pubspec.yaml` for All Plugins app.

## v0.0.15

- Add a command for running driver tests of plugin examples.

## v0.0.14

- Check for dependencies->flutter instead of top level flutter node.

## v0.0.13

- Differentiate between Flutter and non-Flutter (but potentially Flutter consumed) Dart packages.
29 changes: 29 additions & 0 deletions packages/plugin_tools/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2017, Flutter
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45 changes: 45 additions & 0 deletions packages/plugin_tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Flutter Plugin Tools

[![Build Status](https://travis-ci.org/flutter/plugin_tools.svg?branch=master)](https://travis-ci.org/flutter/plugin_tools)
[![pub package](https://img.shields.io/pub/v/flutter_plugin_tools.svg)](https://pub.dartlang.org/packages/flutter_plugin_tools)


Flutter Plugin Tools implements a CLI with various productivity tools for hosting multiple Flutter plugins in one github
repository. It is mainly used by the [flutter/plugins](https://github.com/flutter/plugins) and
[flutter/flutterfire](https://github.com/flutter/flutterfire) repositories. It was mainly written to facilitate
testing on Travis for these repositories (see [.travis.yml](https://github.com/flutter/plugins/blob/master/.travis.yml)).

As an example, Flutter Plugin Tools allows you to:

* Build all plugin example apps with one command
* Run the tests of all plugins with one command
* Format all Dart, Java, Objective-C, and C++ code in the repository
* Define shards of the above tasks

## Installation

In order to use the tools you need to enable them once by running the following command:

```shell
$ pub global activate flutter_plugin_tools
```

## Requirements

To use all features of `flutter_plugin_tools` you'll need the following commands in your `PATH`:
* `flutter`
* `git`
* `pub` (recommended: version from `<path/to/flutter>/bin/cache/dart-sdk/bin`)
* `clang-format` version 5 (alternatively, you can provide the path via `--clang-format=`)
* [`pod`](https://guides.cocoapods.org/using/getting-started.html#installation) (macOS only)

## Usage

```shell
$ pub global run flutter_plugin_tools <command>
$ pub global run flutter_plugin_tools <command> --shardIndex 0 --shardCount 3
```

Run commands from the `flutter/plugins` directory. Replace `<command>` with `help` to print a list of available commands.
The sharded example above divides the plugins into three shards
and executes the tool on the first shard (index 0).
1 change: 1 addition & 0 deletions packages/plugin_tools/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include: package:pedantic/analysis_options.1.8.0.yaml
5 changes: 5 additions & 0 deletions packages/plugin_tools/bin/flutter_plugin_tools.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

export 'package:flutter_plugin_tools/src/main.dart';
Loading