168 Commits

Author SHA1 Message Date
dd2fc61b1c [tools] Add update-release-info (#5643) 2022-05-18 16:17:29 -07:00
ca9a81d653 [ci/tools] Add iOS/macOS analysis to catch deprecated code (#5778) 2022-05-18 08:47:12 -07:00
517d3761f2 [tools] Validate example READMEs (#5775) 2022-05-17 17:32:10 -07:00
5f2b2300ef [tools] Fix publish flag calculation (#5694) 2022-05-13 17:34:12 -07:00
e8b4147fcc Re-sync analysis_options.yaml with flutter/flutter (#5695)
The analysis options have gotten behind; this re-syncs to the current state of flutter/flutter. For options that are non-trivial to enable, either because they are non-trivial to fix, or touch a very large number of files, they are locally disabled with clear "LOCAL CHANGE" markers so that it's obvious where we are out of sync. For options that are simple to resolve, they are enabled in the PR.

Part of https://github.com/flutter/flutter/issues/76229
2022-05-11 11:48:47 -04:00
1a124b18d3 Revert "Enable lints library_private_types_in_public_api, sort_child_properties_last and use_key_in_widget_constructors" (#5691)
This reverts commit 5d92a4717a7a266f485974ff5403122ef2570935.

This includes a fix for a latent bug in the version-check repo tooling command that caused it to fail when reverting a package that previously had a NEXT section, so that tests will pass.
2022-05-10 13:05:18 -04:00
5ec6644f3f [tools] Convert test utils to RepositoryPackage (#5605) 2022-05-03 14:14:11 -07:00
5a06b47e51 [tools] Remove single-example RepositoryPackage method (#5600) 2022-05-03 10:59:11 -07:00
1186d6831f [flutter_plugin_tools] Include examples in test (#5453) 2022-05-02 21:44:10 -07:00
fbf53f284b [flutter_plugin_tools] Support non-plugin packages for drive-examples (#5468) 2022-05-02 14:44:12 -07:00
d43fae6fb4 [flutter_plugin_tools] Validate code blocks in readme-check (#5436) 2022-04-28 19:29:09 -07:00
6770bf9245 [flutter_plugin_tools] Remove UWP (#5432) 2022-04-28 10:19:12 -07:00
4cecb9b264 [flutter_plugin_tools] Adds update-excerpts command (#5339) 2022-04-28 09:34:11 -07:00
88829b67ac [flutter_plugin_tool] Allow re-pathifying dependencies (#5376) 2022-04-26 13:39:09 -07:00
cc32f688bb [flutter_plugin_tools] Run pub get for custom-test (#5322)
When running a Dart test script for `custom-test`, `pub get` needs to be
run first in order for it to work in a clean environment such as CI.

This will unblock enabling Pigeon's Dart tests in flutter/packages.
2022-04-21 13:08:21 -07:00
57e6a62dc8 [flutter_plugin_tools] Preserve Dart SDK version in all-plugins-app (#5281)
Fixes `all-plugins-app` to preserve the original application's Dart SDK
version to avoid changing language feature opt-ins that the template may
rely on.
2022-04-15 11:01:46 -07:00
b0567c3fcc Add supported OS version tables to READMEs (#5106) 2022-04-04 12:26:13 -07:00
f0c3b6baee [flutter_plugin_tool] Add custom-test command (#5058) 2022-03-18 08:10:25 -07:00
2e5c3fbcb1 [flutter_plugin_tools] packages get -> pub get (#5046) 2022-03-15 14:15:07 -07:00
1bbfb60816 [flutter_plugin_tools] Fix subpackage analysis (#5027) 2022-03-11 12:15:26 -08:00
159f6d87b7 [ci] Run analysis with older versions of Flutter (#5000) 2022-03-09 08:35:23 -08:00
199afd96f1 [flutter_plugin_tool] Fix iOS/macOS naming (#4861) 2022-02-15 17:20:24 -08:00
fdba05bf57 [flutter_plugin_tool] Remove podspec --allow-warnings (#4839) 2022-02-14 12:50:12 -08:00
4aeb80aed7 [url_launcher] Support new desktop implementation versions (#4779) 2022-02-10 14:35:22 -08:00
7009234867 Enforce asterisk alignment for C++ and ObjC pointers (#4703)
So far we've been using the default mode of prevailing-in-file, which
means we aren't consistent within each language what mode we use. Now
that clang-format can identify ObjC headers (which didn't used to be the
case), we can enforce different styles for the two languages.

This sets left-aligned for C++ to match the Flutter engine, and
right-aligned for ObjC to match the prevaling Apple style.
2022-01-26 17:59:32 -05:00
902c337f6f [ci] Pin Chromium version for web tests (#4620)
Switches the web tests from using the version of Chrome installed by the Dockerfile, which is whatever happened to be stable when the image is generated, and thus not hermetic, to a pinned version of Chromium. This uses a slightly modified version of the script that is already used for flutter/packages.

Since Chromium doesn't support mp4 playback, this updates the `video_player` integration tests to use WebM on web instead, to avoid having all the tests fail in CI.

Part of https://github.com/flutter/flutter/issues/84712
2022-01-05 12:53:05 -08:00
7855a20369 [flutter_plugin_tools] Auto-retry failed FTL tests (#4610)
Currently the flake situation for Firebase Test Lab tests is very bad,
and the task running those tests are some of the slowest tasks in the
CI. Re-running failed tests is slow, manual work that is signficantly
affecting productivity.

There are plans to actually address the flake in the short-to-medium
term, but in the immediate term this will improve the CI situation, as
well as reducing the drag on engineering time that could be spent on the
root causes.

Part of https://github.com/flutter/flutter/issues/95063
2021-12-15 08:22:52 -08:00
e45a509b35 [tools] fix typo in tools (#4607) 2021-12-10 16:09:20 -08:00
12afeda41e Add missing return for nullably typed function (#4598) 2021-12-10 03:18:07 -08:00
3de67cea56 [flutter_plugin_tools] Improve package targeting (#4577)
Improve package targeting:
- `--run-on-changed-packages` now includes only changed packages in a federated plugin, not all packages. Include all packages isn't useful since (without changes that would cause them to be included anyway) package dependencies are not path-based between packages.
- `--packages` now allows specifying package names of federated plugins. E.g., `--packages=path_provider_ios` will now work, instead of requiring `--packages=path_provider/path_provider_ios`. The fully qualified form still works as well (and is still needed for app-facing packages to disambiguate from the plugin group).

Fixes https://github.com/flutter/flutter/issues/94618
2021-12-07 07:02:24 -08:00
52f49c1aa2 Remove deprecated plugins (#4580)
This removes all of the deprecated plugins from the tree, as well as all references to them.

They were being left in the tree only in case they needed critical fixes before the end of this year, when they will become completely unsupported and be officially discontinued on pub.dev. The end of the year is now close enough that such a release is extremely unlikely, and they are causing some maintenance burden (e.g., the tree is currently closed on an out-of-band failure in android_alarm_manager). In the event that we do have to push an emergency fix in the next several weeks, we can either temporarily restore the plugin from git history, or use a branch.

Minor related cleanup:
- Scanning the repository for remaining references turned up that `image_picker_for_web` and `video_player_for_web` had copypasta'd the package name of its example application from one of the deprecated plugins, so this fixes those names.
- Fixes `federation-safety-check` handling of top-level files in unfederated plugins that accidentally tripped federated plugin heuristics.
- Fixes `federation-safety-check` handling of deleted plugins, as it was crashing, and tests that.
- Fixes `make-deps-path-based` handling of deleted plugins, as it was crashing, and tests that.
2021-12-06 10:23:14 -08:00
5dc663274a [flutter_plugin_tools] Add a new 'make-deps-path-based' command (#4575)
Adds a new command that adds `dependency_overrides` to any packages in the repository that depend on a list of target packages, including an option to target packages that will publish a non-breaking change in a given diff.

Adds a new CI step that uses the above in conjunction with a new `--run-on-dirty-packages` to adjust the dependencies of anything in the repository that uses a to-be-published package and then re-run analysis on just those packages. This will allow us to catch in presubmit any changes that are not breaking from a semver standpoint, but will break us due to our strict analysis in CI.

Fixes https://github.com/flutter/flutter/issues/89862
2021-12-04 09:43:13 -08:00
b25b31427a [flutter_plugin_tools] Check for FlutterTestRunner in FTL tests (#4531)
When running via Firebase Test Lab, ensure that there is a test using
`FlutterTestRunner`. This ensures that a plugin can't silently not run
any of the Dart integration test on Android by having some other native
integration test.

Fixes https://github.com/flutter/flutter/issues/93952
2021-11-23 18:52:01 -08:00
7b6ac13139 [flutter_plugin_tools] Check for missing version and CHANGELOG updates (#4530)
The currently documented repository policy is to:
- require version updates for packages changes that don't meet specific exemptions, and
- require CHANGELOG changes for essentially all changes.

This adds tooling that enforces that policy, with a mechanism for overriding it via PR descriptions, to avoid cases where they are accidentally omitted without reviewers catching it.

In order to facilitate testing (which require mocking another `git` command), this also updates the existing `version-check` tests:
- Replaces the custom git result injection/validating with the newer bind-to-process-mocks approach that is now used in the rest of the tool tests.
- Fixes some tests that were only checking for `ToolExit` to also check the error output, in order to ensure that failure tests are not accidentally passing for the wrong reason (as is being done in general as tests in the tooling are updated).

Fixes https://github.com/flutter/flutter/issues/93790
2021-11-23 08:34:18 -08:00
f4546c0791 [flutter_plugin_tools] Build gtest unit tests (#4492) 2021-11-14 18:26:05 -08:00
d7f8fc267f [flutter_plugin_tools] Add optional timing info (#4500)
Adds a `--log-timing` flag that can be passed to cause package-looping
commands to log relative start time and per-package elapsed time, to
help with future efforts to improve CI times (e.g., finding unusually
slow packages, or designing changes to sharding).

Adds this flag to the CI scripts to enable timing there.
2021-11-14 17:21:32 -08:00
5d15fe9626 [flutter_plugin_tools] Add 'main' support (#4474)
Treat `main` the same as `master` for branch-based switching, in
preparation for switching the branch names in Flutter repositories.

Also updates all of the tests that used `master` as the explicit base to
use `main` instead; what the tests use is arbitrary, so they can be
switched now even though the repo itself hasn't switched.

Part of https://github.com/flutter/flutter/issues/90476
2021-11-10 11:46:35 -08:00
78395e5adf [flutter_plugin_tools] Fix pubspec-check on Windows (#4428)
The repository check always failed when run on Windows, because the
relative path generated to check the end of the URL was using local
filesystem style for separators, but URLs always use POSIX separators.
2021-10-25 08:29:07 -07:00
5bd3ae6a0a [flutter_plugin_tools] Fix license-check on Windows (#4425) 2021-10-20 08:03:04 -07:00
c2717e7699 [ci] Replace Firebase Test Lab deprecated Pixel 4 device with Pixel 5 (#4436) 2021-10-19 10:48:42 -07:00
b7568184de Bump compileSdkVersion to 31 (#4432) 2021-10-15 18:18:02 -07:00
a731d6e131 [flutter_plugin_tools] Validate pubspec description (#4396)
pub.dev deducts points for having a pubspec.yaml `description` that is too short or too long; several of our plugins are losing points on this. To ensure that we are following—and modeling—best practices, this adds a check that our `description` fields meet pub.dev expectations.

Fixes our existing violations. Two are not published even though this only takes effect once published:
- camera: We change this plugin pretty frequently, so this should go out soon without adding a release just for this trivial issue.
- wifi_info_flutter: This is deprecated, so we don't plan to release it. It has to be fixed to allow the tool change to land though.
2021-09-30 10:30:26 -07:00
769043d35a [flutter_plugin_tools] Check licenses in Kotlin (#4373)
The license check overlooked Kotlin, since it's not currently widely
used in our repositories.

Also adds the missing license to one Kotlin file, from an example that
was (likely accidentally) re-generated using Kotlin instead of Java.
2021-09-28 06:20:20 -07:00
3d4782ae62 [flutter_plugin_tools] Improve version check error handling (#4376)
Catches invalid CHANGELOG formats and logs useful error messages for them,
rather than throwing FormatExceptions.
2021-09-23 12:40:04 -07:00
c0aca80c15 [flutter_plugin_tools] Allow overriding breaking change check (#4369) 2021-09-23 10:23:06 -07:00
91ef4b1a00 Add false secret lists, and enforce ordering (#4372) 2021-09-22 10:58:07 -07:00
211a21792e Require authors file (#4367)
Adds a check to `publish-check` that there is an AUTHORS file present,
since our license refers to "The Flutter Authors", so we want to have a
file distributed with each package that says who the AUTHORS are (vs.
just having a top-level repo AUTHORS file, which is not part of package
distribution).

Adds AUTHORS files to packages that have been created since the
earlier one-time fix that added them, but didn't add a check to prevent
future issues.

Also updates the publish-check failure tests to include checks for
specific output so that we know that they are failing for the reasons
the test is expecting, bringing them up to current repo standards for
failure tests.

Fixes https://github.com/flutter/flutter/issues/89680
2021-09-21 12:04:34 -07:00
3e7ec17a0e [flutter_plugin_tools] Fix federated safety check (#4368)
The new safety check doesn't allow simple platform-interface-only
changes because it doesn't actually check that a non-interface package
is actually modified before failing it for a modified platform
interface.

This fixes that, and adds a test case covering it.
2021-09-21 12:03:58 -07:00
1b95825c76 [flutter_plugin_tools] Add a federated PR safety check (#4329)
Creates a new command to validate that PRs don't change platform interface packages and implementations at the same time, to try to prevent ecosystem-breaking changes. See https://github.com/flutter/flutter/issues/89518 for context.

Per the explanation in the issue, this has carve-outs for:
- Changes to platform interfaces that aren't published (allowing for past uses cases such as making a substantive change to an implementation, and making minor adjustments to comments in the PI package based on those changes).
- Things that look like bulk changes (e.g., a mass change to account for a new lint rule)

Fixes https://github.com/flutter/flutter/issues/89518
2021-09-20 10:54:02 -07:00
927e0ab197 Run firebase test in flutter-cirrus (#4332) 2021-09-14 22:02:03 -07:00