34 Commits

Author SHA1 Message Date
184e9a7023 [tool] add all and dry-run flags to publish-plugin command (#3776) 2021-04-30 15:29:04 -07:00
2bd3f401a7 Re-add bin/ to flutter_plugin_tools (#3839)
This should have been re-added in #3836 but was missed, so it doesn't
work correctly via `pub global`.
2021-04-30 12:47:14 -07:00
142fc9793d switch from using 'tuneup' to analyze to 'dart analyze' (#3837) 2021-04-30 07:02:19 -07:00
fe6b847932 Prep the tools for publishing (#3836)
Re-adds the LICENSE and CHANGELOG, and updates the README and pubspec,
in preparation for pushing an updated version of the package.

We are still using flutter_plugin_tools in flutter/packages, so this
allows us to use updates (e.g., license checks, fixed version checks) in
that repository as well. The README has been updated to note that it is
no longer intended for general use, and we will (if it allows
publishing) continue to mark the package as discontinued to reflect
that.
2021-04-29 20:05:38 -07:00
189845bb8a [tool] combine run and runAndExitOnError (#3827) 2021-04-27 09:35:05 -07:00
3c57df37c0 Move all null safety packages' min dart sdk to 2.12.0 (#3822) 2021-04-23 10:19:03 -07:00
c4170d8f64 [tools] fix version check command not working for new packages (#3818) 2021-04-21 16:40:20 -07:00
63d42fcdb9 Update PULL_REQUEST_TEMPLATE.md (#3801) 2021-04-20 04:24:02 -07:00
b2eefc9158 Fix and update version checks (#3792)
Currently our version update checks aren't actually working; the script doesn't work correctly if no explicit --base-sha is passed, but that's always how CI is calling it.

Fixes https://github.com/flutter/flutter/issues/79823 (and version checks in general)

This makes a number of changes:
- Fixes it to work without --base-sha
- Adds tests that it works in that mode
  - And tightens existing tests to require ToolExit, not just any error, to reduce false-positive test success
- Adds verbose logging of the checks being done, to make it easier to debug this kind of issue in the future
- Tightens the exception handling for missing previous versions to just the line that's expected to fail in that case
- Only allows missing versions when "publish_to: none" is set
  - Adds that everywhere it's missing
  - Standardize the format in the repo to "none" (instead of also having "'none'").
- Allows the use of NEXT in CHANGELOG as a way of gathering changes that are worth noting, but not
  doing a publish cycle for. (Replaces the plan of using -dev versions, since that's actually harder to implement,
  and more confusing.)
  - Ensures that we don't forget to clean up NEXT entries when bumping versions
2021-04-08 16:22:19 -04:00
3d9e523218 Switch script/tools over to the new analysis options (#3777)
Removes the legacy analysis options override and fixes all resulting issues. This is a combination of dart fix and manual changes (mostly mechanical, but some small restructuring to address warnings more cleanly, such as creating typed structs from args when they are used repeatedly to avoid repeated casting, or making things that were unnecessarily public private).

One small opportunistic extra cleanup is that the handling of null-safety prerelease versions is removed, as any new plugin would be written null-safe from the start, so we no longer need to allow those versions.

Part of flutter/flutter#76229
2021-04-06 13:04:25 -07:00
5ea4d5fdfc [tool] refactor publish plugin command (#3779) 2021-04-05 13:54:05 -07:00
b8b7ef5cd5 Update build-all test for null-safe template (#3773)
Flutter master now creates NNBD code when running 'flutter create', so
the generated pubspec for build_all needs to use a compatible SDK
version. This updates from 2.0.0 to 2.12.0.

Also includes a test for this, which involved setting up tests for the
file, and doing some refactoring to make the command testable. As a
result, this fixes https://github.com/flutter/flutter/issues/61049
(although more test backfill is needed).
2021-03-30 13:34:20 -07:00
b98ea9175b Add tests for publish check tool command (#3760) 2021-03-29 07:27:40 -10:00
e8f4aea298 [ci] Do not use empty exclude directories in analyze_command. (#3748)
* Add CUSTOM_ANALYSIS_PLUGINS back with all the plugins that now have a custom analysis_options.yaml
2021-03-24 15:56:40 -07:00
8143dc2673 [flutter_plugin_tools] Also look for Java tests in plugin path (#3742) 2021-03-24 12:20:04 -07:00
116a0e2900 [ci] Run more web tests (#3739)
This change enables the integration_tests of the following packages to run in Cirrus CI:

* google_sign_in_web
* connectivity_for_web
* google_maps_flutter_web
* url_launcher_web
2021-03-19 16:34:20 -07:00
514457de82 Enable web integration tests in CI (#3738) 2021-03-19 14:11:06 -07:00
aef6008b7b Standardize copyright year (#3737)
Standardizes all first-party copyrights on a single year, as is done in flutter/flutter and flutter/engine. All code now uses 2013, which is the earliest year that was in any existing copyright notice.

The script checks now enforce the exact format of first-party licenses and copyrights.

Fixes flutter/flutter#78448
2021-03-19 13:18:00 -07:00
c956cb3270 Standardize Copyrights: Chromium->Flutter (#2996)
In all copyright messages (and in the Xcode project organization name) standardize on "The Flutter Authors", adding "The Chromium Authors" to the Flutter AUTHORS list. This reduces inconsistency in the copyright lines in this repository, moving closer to a single consistent copyright+license (as in flutter/engine and flutter/flutter)

Updates the validation script to no longer accept "The Chromium Authors" or "the Chromium project authors" in first-party code.
2021-03-18 19:05:33 -04:00
c7b35882b4 Fix cosmetic variations in copyrights and license files (#3730)
- Replaces "the Flutter project authors" with the repo-standard version "The Flutter Authors"
  - Updates the license check not to allow "the Flutter project authors" in the future
- Fixes a few minor cosmetic variations that had crept back into LICENSE files since my
  mass-standardization of those files.
  - Updates the license check to validate those to prevent such drift in the future.
2021-03-18 13:28:44 -07:00
85e7e4391b Prep for alignment with Flutter analysis options (#3703)
Renames the old analysis_options.yaml to analysis_options_legacy.yaml,
replacing it with a slightly modified copy of flutter/flutter's analysis
options.

Each plugins has a temporary local analysis_options.yaml that points to
the legacy version. This allows for inceremental conversion on a
per-plugin basis, which should make the problem more tractable.

Since this hasn't yet been enabled for any packages, it's likely that as
it is we'll find a few local modification we need to make to the root
analysis_options (e.g., things that conflict with 'dart format').

Part of https://github.com/flutter/flutter/issues/76229
2021-03-17 13:25:28 -07:00
6141051fa2 Add missing licenses, and add a check (#3720)
Adds a new CI check that all code files have a copyright+license block (and that it's one we are expecting to see).

Fixes the ~350 files (!) that did not have them. This includes all of the files in the .../example/ directories, following the example of flutter/flutter. (This does mean some manual intervention will be needed when generating new example directories in the future, but it's one-time per example.)

Also standardized some variants that used different line breaks than most of the rest of the repo (likely added since I standardized them all a while ago, but didn't add a check for at the time to enforce going forward), to simplify the checks.

Fixes flutter/flutter#77114
2021-03-16 17:50:51 -04:00
c415eebb5b [tool] Improve check version ci so that it enforces the version in CHANGELOG and pubspec matches. (#3678) 2021-03-10 14:15:04 -08:00
01a4eca6e7 Skip pod lint tests (#3692) 2021-03-08 18:05:00 -08:00
373cf772f0 Update CI config for Flutter 2 (#3674)
Includes cleanup to simplify our setup. Major changes:
- Eliminate the NNBD plugin filtering for stable.
- Remove the temporarily-added beta branch testing.
- Enable Linux, macOS, and web on stable (Windows is LUCI-based)
- Combine the two different macOS matrix configurations now that they
  are the same.
- Combine the two different Linux matrix configurations by using a single
  Dockerfile (which now also includes clang-format)
  - The web integration smoke test temporarily still uses the old Dockerfile,
    now renamed, because the driver installer script doesn't support
    Chrome 89 yet.
- Move most of the Linux tasks to lower-CPU machines to allow more
  tasks to run in parallel without hitting the community limit.
- Reorder the tasks slightly and give them comments to identify
  platform groupings
- Enabled web "build all plugins together" and "build all examples"
  tests
2021-03-04 13:59:21 -08:00
c042ad3628 Adopt Xcode 12 for podspec lints (#3653) 2021-03-03 10:56:12 -08:00
3ea78093bf Run static analyzer during xctest (#3667) 2021-03-02 19:27:48 -08:00
e1b3b296f2 Move plugin tool tests over (#3606) 2021-03-01 18:15:51 -08:00
55ed162e42 [in_app_purchase] Migrate to NNBD (#3555) 2021-02-19 11:56:26 -08:00
67e7ab4745 Publish check ignores prerelease sdk (#3560) 2021-02-18 09:47:08 -08:00
c885248c16 Publish check (#3556) 2021-02-17 09:17:44 -08:00
bd8e34c7b1 Remove iOS stubs (#3490)
Plugins that don't actually support iOS are no longer required to have
an iOS stub to prevent build failures. This removes all iOS stubs from
plugins that don't support iOS.
2021-02-16 19:01:31 -05:00
d12e22a68d Fix the build-all exclusion list (#3552)
build_all_plugins_app.sh contains an exclusion list, which currently contains almost all of the non-app-facing plugins. However, the script those exclusions are passed to expects federated plugin exclusions to be of the form plugin_name/plugin_name_subplugin_name, not just plugin_name_subplugin_name, so in practice almost nothing on that list has actually been doing anything.

This fixes the script to allow either mode of exclusion (since clearly people expect using just the name to work), and scrubs everything from the list that clearly wasn't actually needed.
2021-02-16 06:41:53 -08:00
d3b50950ba Move plugin tools code (#3544) 2021-02-12 13:46:44 -08:00