343 Commits

Author SHA1 Message Date
44ee590f33 [ci] Run Swift formatter and linter during CI formatting (#5928)
Make `swift-format` CIPD package available on the `PATH` https://flutter-review.googlesource.com/c/recipes/+/54020

Run `format --no-clang-format --no-java --no-kotlin --no-dart`  on the macOS builder so it doesn't duplicate same `format` call run on Linux.

Filter out generated files until https://github.com/flutter/flutter/issues/141799 is done.

Also add `swift-format lint` call during `format` command.  Fix the one casing issue it found in a test file.

Failing run:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8758535881172004177/+/u/Run_package_tests/Swift_format/stdout

Successful run:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8758492350529121249/+/u/Run_package_tests/Swift_format/stdout

Fixes https://github.com/flutter/flutter/issues/41129
2024-01-19 22:38:11 +00:00
8ab9b253b6 [ci] Add flags to formatter command to decide which formatters to run (#5905)
Get ready for a world where `swift-format` is available on the `PATH` https://flutter-review.googlesource.com/c/recipes/+/54020

1. Add `format --clang-format --java --kotlin --swift --dart` flags to decide whether to run specific formatters, as opposed to using the `path`.  Keep `swift-format` optional but default the others to run.  This matches the current behavior on Linux.
2. Add `*-path` variants of each.

This will allow us to run `format --swift --no-clang-format --no-java --no-kotlin --no-dart`  on the macOS bot so it doesn't duplicate same `format` call run on Linux.

Part of https://github.com/flutter/flutter/issues/41129
2024-01-18 15:59:25 +00:00
14b94ff834 [google_maps_flutter] Drop iOS 11 support (#5873)
Now that the latest Flutter stable requires iOS 12, and will auto-adjust projects, we can drop iOS 11 support in this plugin without breaking users. Having a minimum of iOS 12 means that Cocoapods should not resolve to anything older than Google Maps 6.x, which is the version that add arm64 simulator support, so the workaround to explicitly not build that can be removed. This means `google_maps_flutter` will no longer force projects into the buggier Rosetta iOS simulator path.

This folds the iOS 11 and iOS 12 examples together, since (per `examples/README.md`) the iOS 11 version is the one containing most of the tests. To minimize the potential of losing tests due to mistakes, this was done by deleting the iOS *12* example, renaming the iOS 11 example, and then updating it to a minimum of 12.

Fixes https://github.com/flutter/flutter/issues/94491
2024-01-12 19:57:24 +00:00
d74d687dc0 [ci] Check repo-level package metadata (#5811)
Adds a new tool command (and runs it in CI) to check that each package:
- is listed correctly in the repo-level README.md table
- has a CODEOWNERS entry

In the future we could add other things (e.g., auto-label), but these were the main things we've had issues with recently.

Updates README.md and CODEOWNERS to fix failures it found:
- Adds a couple of missing CODEOWNERS
- Expands the web implementation CODEOWNERS to individual packages so that we don't have to special-case handling in the tool
- Fixes some minor mistakes in README.md
- URL-encodes all `:`s in the README.md links (which is why ever line shows as changed); it worked without that in practice, but it should really be encoded, and having it consistently encoded made things easier for the tooling.
2024-01-12 14:11:30 +00:00
c5349bc9a5 [various] Add iOS privacy manifests (#5846)
Adds privacy manifests to all iOS plugins.

While we only *need* to do the plugins listed [here](https://developer.apple.com/support/third-party-SDK-requirements/) for now, the wording of the page:
> The following are commonly used SDKs in apps on the App Store

suggests that the list of things for which this is required is just an arbitrary cutoff rather than a conceptual distinction, so it seems safest to just assume the list will grow over time and do all of them. To ensure that, this includes new repo tooling to check that a manifest is specified in the podspec.

The large caveat is that we do not currently know if this actually works. This is the method of inclusion that seems to be [the consensus among people using Cocoapods](https://github.com/CocoaPods/CocoaPods/issues/10325), as bundling it directly as a `resource` causes problems for clients who do not use `use_frameworks`. (In theory it seems like a manifest would not actually be *required* in that case since there is no framework, but it has the potential to actually stomp top-level resources.) Hopefully the automated analysis that Apple will eventually roll out will tolerate the file being bundled in a resource bundle in the framework rather than a top-level manifest file. If not, however, it's not clear how Cocoapods can be supported, so we can adopt this common approach for now under the assumption that eventually tooling will adapt to the reality of the ecosystem, and revisit the exact bundling later if necessary.

Only `shared_preferences` has a non-empty manifest, as it is our only plugin that uses a required reason API, and none of our plugins themselves collect private data. Ideally for that plugin we would instead use `C56D.1`, which is for wrappers, but as currently written we can't use it since it's exclusively a wrapper. If that changes in the future based on our pending request, we can revisit. For now, however, this reason should suffice since we don't currently allow reading from other app groups.

Fixes https://github.com/flutter/flutter/issues/131495
Fixes https://github.com/flutter/flutter/issues/139756
Fixes https://github.com/flutter/flutter/issues/139757
Fixes https://github.com/flutter/flutter/issues/139758
Fixes https://github.com/flutter/flutter/issues/139759
Fixes https://github.com/flutter/flutter/issues/139760
See also https://github.com/flutter/flutter/issues/139761
2024-01-12 04:27:39 +00:00
0009545dd2 [ci] Run 'flutter build --config-only for iOS and macOS during fetch deps (#5804)
For iOS and macOS move fetch deps from explicity running `pub get` and `pod install` to instead run `flutter build x --config-only` which smartly fetches deps and lays down the required native pieces.  I didn't guard it on whether certain files are present since the command already has similar guards, and runs pretty fast if the native code has already been generated.

This fixes an issue where `pod install` is run before the Flutter native bits and migrations are run.

Fixes issues seen in the Flutter roll https://github.com/flutter/packages/pull/5792#issuecomment-1876103613
```
Running command: "pod install" in /Volumes/Work/s/w/ir/x/w/packages/packages/camera/camera_avfoundation/example/ios
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Flutter":
  In Podfile:
    Flutter (from `Flutter`)

Specs satisfying the `Flutter (from `Flutter`)` dependency were found, but they required a higher minimum deployment target.

[!] Automatically assigning platform `iOS` with version `11.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Unable to "pod install"
```

Caused by https://github.com/flutter/flutter/pull/140478
2024-01-05 00:45:12 +00:00
e57318508e [tool] Handle Flutter dev dependencies (#5775)
A non-Flutter package can have Flutter-based tests (e.g., cupertino_icons), in which case we need to use `flutter test` rather than `dart test` just like we would for a package with a non-dev Flutter dependency. This updates the `requiresFlutter` check to include dev dependencies as well as normal dependencies.
2024-01-04 19:55:17 +00:00
bb97da8ec6 [various] Sync lints with flutter/flutter (#5717)
Applying the latest analysis_options.yaml from flutter/flutter to this
repo. Most fixes were auto-generated by `dart fix`.
2024-01-03 15:16:49 -08:00
4c3bc496be Remove workarounds for check_podspecs needed for older version of Cocoapods (#5724)
CI has been updated to Cocoapods 1.13, which fixes previous issues with the plugin_lint_mac test. Remove workarounds added previously.

See https://github.com/flutter/flutter/issues/125812.
2023-12-20 17:39:02 +00:00
ee593fd2c4 [tool] Add support for .java, .gradle, .sh, and .m files… (#5567)
… to `update-excerpts` tool

Need this tool to recognize `.java`, `.gradle`, and `.sh` files in order to complete [flutter/flutter#102679](https://github.com/flutter/flutter/issues/102679). The `README.md` for the `espresso` package contains code from `.java`, `.gradle`, and `.sh` files.

Support for `.m` files was requested by @tarrinneal.
2023-12-13 21:01:50 +00:00
2b53f7253d [Android] Bump Gradle version to 7.6.3 (#5522)
Part of fix for https://github.com/flutter/flutter/issues/138336 by bumping the Gradle version of all package example apps (plus `image_picker_android` plugin) to 7.6.3 from those that had a version below that to fix security vulnerability.

Also fixes a bug I found while using the `update-dependencies` packages tool command that caused it to not catch all of the `gradle-wrapper.properties` files when running with the `gradle` dependency + added a test for the fix.
2023-12-13 19:21:50 +00:00
8411522be7 [tools] Validate pubspec topic format (#5565)
Fixes https://github.com/flutter/flutter/issues/139305
2023-12-12 16:44:27 +00:00
51174d166d [tool] Use ^ for Dart SDK (#5623)
The update-min-sdk command has been using explicitly ranges for the Dart
SDK, because that used to be required. Current versions of `pub` no
longer require that, and using `^` for Dart ranges is okay, so this
updates the tooling to use that format in the future.

Also removes the special casing that changed the upper bound from 3 to
4, since we have passed the point where we are generating upper bounds
less than 4 anyway.

To minimize churn, this doesn't update the existing pubspecs. We can
incrementally adopt this going forward as we roll dependencies forward.

Fixes https://github.com/flutter/flutter/issues/139806
2023-12-08 20:38:30 -08:00
639c5f05ed [ci] Roll minimum allowable Flutter to 3.10 (#5425)
Updates the repo for Flutter 3.16, making the minimum version that packages are allowed to support 3.10, following the process in https://github.com/flutter/flutter/wiki/Updating-Packages-repo-for-a-stable-release

Per https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version this does not bump versions.
2023-11-18 01:57:18 +00:00
42dbb7573a [file_selector_web] migrate to pkg:web (#5413)
This allows this package to be used in a web app compiled to Wasm.

Helps unblock https://github.com/flutter/devtools/issues/6606
2023-11-17 00:40:15 +00:00
07b4b298fa [script] use dart:io support for forwarding stdout/stderr (#5410) 2023-11-16 15:01:13 +00:00
72de224b08 [tool] Add Kotlin autoformatting (#5374)
Updates the tooling to fetch and use `ktfmt` for Kotlin code, the same way it currently does for the Google Java formatter, and applies that formatting (in the default mode; see discussion in the linked issue) to the repository.

In the future we could revisit the formatter or mode, but since this currently seems to be the most consistent with our other languages and to google3 formatting this is likely the option we'll want to stick with.

Fixes https://github.com/flutter/flutter/issues/118756
2023-11-13 16:18:25 +00:00
86b116807e [repo] Adjust error message layout for repo checks (#5241)
This tweaks the errors messages that provide info like how to override a repo check for versioning or changelog updates.
Basically added newlines, so the errors do not require scrolling far off to the right to get the message.
2023-11-07 20:40:35 +00:00
64dbd3a303 [tool] Add option for Android compile SDK version to update-dependencies command (#5010)
Adds option to `update-dependencies` command to update the compile SDK version of plugins or their example apps.
2023-10-31 22:15:01 +00:00
e73b364bc7 [tool] Add optional swift-format support (#5204)
Adds support for swift-format in the `format` command. For now this is optional, so is only triggered if the flag is explictly passed. In the future, once we have CI support for swift-format, we will likely want to make it on-by-default as with the other formatters.

Part of https://github.com/flutter/flutter/issues/41129
2023-10-23 16:10:19 +00:00
c4c3e4eba9 [tool] Fix filter-packages-to when everything is changed (#5182)
`filter-packages-to` didn't correctly the handle the case where the set of target packages is empty, meaning that all packages should be tested. This broke it for cases such as changing a CI configuration file, making the filter not take effect.
2023-10-19 15:28:16 +00:00
d0e9a0e1b3 [video_player] Endorse macOS (#5021)
Endorses the macOS implementation of `video_player`, updating the constraint of the existing `video_player_avfoundation` dependency to ensure macOS support is present. Adds macOS support to the example, and adds macOS discussion to the README.

This is the first macOS plugin with multiple integration test files, which turned up a bug in `flutter test`, so this also includes a repo tooling change to work around that bug for now by running each integration test file separately on macOS (as we already have to do with `flutter drive` on web).

Fixes https://github.com/flutter/flutter/issues/41688
2023-09-28 21:17:33 +00:00
95c88f8a9b [tool] Don't lint Flutter shim podspecs (#5007)
The Flutter build process creates podspecs that are just shims pointing to the local Flutter framework, and which don't pass the linter since they aren't intended for publishing. When finding podspecs to lint, skip those.

This avoids incorrect failures when running on a tree that isn't clean (in particular, where macOS and/or iOS builds have happened), which is very common locally.
2023-09-28 00:52:05 +00:00
a9a8cc640c [camera_android] Downgrade to AGP 7.3.0 to fix build_alll_packages test failures (#4997)
Fixes the current failures of the build_all_packages tests that were caused in https://github.com/flutter/packages/pull/4951/files.
2023-09-26 15:01:58 +00:00
e04ba886a8 [tool] Add a package inclusion filter (#4904)
Creates a package filter flag that is an opt-in mirror to the `exclude` flag, for use with the automatic package selection options used in CI. Like `exclude`, it allows for YAML files as input.

This allows for creating split test runs in CI (e.g., during incremental migrations), where the same file is an inclusion filter for one run and an exclusion filter for the other, guaranteeing that tests are in one or the other without the possibility of some tests falling through the cracks.
2023-09-12 15:21:00 +00:00
aaae5ef97a [tool] Add Android dependency (gradle) option to update dependencies command (#4757)
Adds an `android-dependency` option to the `update-dependency` command such that you can update Android dependencies provided the dependency and a version across relevant plugins. This PR specifically adds support for the Gradle dependency, relevant to plugin example apps.

Running the command looks like:
```
dart run script/tool/bin/flutter_plugin_tools.dart update-dependency --android-dependency gradle --version 1.2.3
```
2023-09-08 11:45:55 +00:00
b8b84b2304 [tools,pigeon] Update tooling to handle Windows build output changes (#4826)
Updates the tooling that builds and runs Windows unit tests to handle the build output path changes in https://github.com/flutter/flutter/pull/131843
2023-09-01 13:57:55 +00:00
b4985e25fe [all] Add topics to pubspecs (#4771)
Adds [topics](https://dart.dev/tools/pub/pubspec#topics) to all
packages, supporting the new pub feature for categorizing packages. The
heuristics I used were:
- Try to use existing topics from https://pub.dev/topics where
applicable
- Add new topics as necessary to cover things that seemed like obvious
relevant topics
- Include the plugin name as a topic for all federated plugin packages,
for grouping (since pub doesn't inherently group or cross-link
implementations)

This is not an attempt to be exhaustive; as topics evolve I expect we
will add more or adjust.

Also updates the repo tooling to enforce topics, so that we don't forget
to add them to new packages. The enforced rule is:
- All packages must have at least one topic. We could potentially change
this to allow an empty `topics` section so that we are enforcing that we
didn't just forget to add the section, but in practice even for packages
that we don't expect people to be likely to use, I didn't have any issue
coming up with at least one relevant topic.
- Federated plugin packages must contain the plugin name as a topic.

While this isn't time-critical, I chose to include version bumps so that
we aren't rolling out topics in a piecemeal way (e.g., with only a
random subset of a federated plugin's packages having topics on pub.dev
based on what has happened to have a bugfix).
2023-08-29 13:31:23 -04:00
d92cdf0a63 [ci] Update minimums for 3.13 stable (#4731)
- Updates the N-1 and N-2 analysis bot configs to 3.7 and 3.10
- Updates the minimum allowed SDK to 3.7, since that's now the earliest we have any testing for.
- Updates all packages to Flutter 3.7/Dart 2.19 as a minimum.
  - In packages where we hadn't released since the last minimum version bump, I removed the previous line from the `#NEXT` section to make it less confusing when we do release.

Per https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version this does not update any package versions.
2023-08-17 19:59:58 +00:00
6cb2a32b7f [All] Expand artifact hub to all plugins (#4645)
- Adds artifact hub check to gradle command
- Add tests for build.gradle and settings.gradle check
- Update all example build.gradle and settings.gradle files

flutter/flutter/issues/120119

Expansion of https://github.com/flutter/packages/pull/4567
2023-08-07 18:33:26 +00:00
d7ee75ad59 [tool] Skip pathified analysis on resolver errors (#4647)
If adding a pathified dependency creates a resolver error, then skip it instead of failing when running pathified analysis. The purpose of pathified analysis it to pre-detect failures that would happen on publishing, and if there's a resolver error that means the publishing even won't affect the package anyway.

See https://github.com/flutter/packages/pull/4483#issuecomment-1664468621 for an example case where we need this.

(In theory we could get delayed OOB errors that this will miss—e.g., in the case above if the PR would actually break rfw/example/wasm, then if at some later date `wasm` updated to use a newer `ffi`, eliminating the resolver conflict, then suddenly rfw/example/wasm would pick up the PR and break. That seems *extremely* unlikely, however, so I'm not concerned that this will be a problem in practice. We can revisit if that changes.)
2023-08-05 14:36:33 +00:00
066e47a5f2 [ci] Add LUCI version of Android FTL tests in bringup mode (#4571)
Adds new LUCI versions of the Android FTL tests. These are new tasks, rather than being part of android_platform_tests, since those are already running the emulator version of the tests, and the combination is far too slow (unless we roughly double the number of shards anyway), and this lets us control the behavior separately (e.g., not running them on `stable`, and potentially making them post-submit only in the future).

Adjusts the repo tooling to make the `gcloud auth` step optional, since that's handled automatically for us in the LUCI environment, and to make it less tightly coupled to the Cirrus configuration by removing those defaults from the tool.

Part of https://github.com/flutter/flutter/issues/114373
See also https://github.com/flutter/flutter/issues/131429
2023-07-28 15:01:10 +00:00
a99fc8765d [tool/ci] Add iOS/macOS and Dart support to fetch-deps (#4562)
Adds `fetch-deps` support for:
- iOS/macOS dependencies, using `pod install`
- Dart package dependencies, using `pub get`

To make avoid doing extra work in the Dart dependencies step when using this with `*_platform_tests` CI, also adds flags for all of the other platforms, and adds a flag that allows skipping Dart dependencies for any package that doesn't have an example supporting any requested platform. This means that we can pass, e.g., `--windows --supporting-target-platforms-only` to only fetch Dart packages for packages with examples that will be build during the build-and-drive Windows tests.

Adds this as a new step in every platform tests CI task, and in the standard analyze step, so that we will pre-fetch Dart packages (and for iOS/macOS, pods). This won't yet fully eliminate later network access (see https://github.com/flutter/flutter/issues/131204), but will give us early warning on any major failures, such as pub being entirely unreachable from the bots.
- These are marked as an infrastructure step; we'll have to see if this ends up being confusing in practice. If `pub` resolution fails for legitimate reasons, such as a PR that tries to require a version of a package that doesn't exist or that has conflicts, this will cause a failure that is marked as infra. My assumption is that the much more common case is going to be that it is actually an infra failure.

Fixes https://github.com/flutter/flutter/issues/130280
2023-07-26 13:06:22 +00:00
369ee7e1a1 [Tool] New tool to download android dependencies (#4408)
This pr is pushed for high level feedback/conversation. I will add tests before serious review. 
should be read in conjuction with https://flutter-review.googlesource.com/c/recipes/+/46980

- Create new top level command to run flutter dependencies on changed packages
- when running android tests download dependencies before running tests

https://github.com/flutter/flutter/issues/120119
2023-07-14 16:04:20 +00:00
e2711c1ff9 [ci] Move snippet checks to LUCI (#4446)
Moves the check that README snippets using code excerpting are up to date to LUCI. Now that the check has been rewritten to be extremely fast, it's folded into the existing repo checks instead of being a separate task.

Also adjusts the tooling slightly so that it logs the count of snippets checked, for auditability in CI, like the old version of the excerpt update tooling did.

Part of https://github.com/flutter/flutter/issues/114373
2023-07-12 16:17:07 +00:00
bd5d19113e [flutter_plugin_tools] Reimplements the excerpt system inline in the tool, rather than relying on a separate package. (#4417)
* Allows excerpts to come from any package, not just examples.
* Fixes a bug in the excerpting logic that was causing a stray `}` to appear in one example.
* Removes the need for `build.excerpt.yaml` files.
* Remove the dependency on build_runner for excerpts.
* Reduces the time to generate the excerpts from about 10 minutes to about 5 seconds.
* Almost certainly fixes https://github.com/flutter/flutter/issues/107180 (untested).

The new logic is not quite backwards compatible; the `path-base` feature now specifies a real path to the actual source directories, rather than a path into the invisible generated `excerpts/` directory with its special structure. Also, a number of features from the previous package that were not actually used in this repository are no longer supported (such as having multiple section names per `#docregion` pragma).
2023-07-11 21:49:24 +00:00
28c419d2ab [tool] Conditionalize color on stdout (#4436)
Refactors colorization to a centralized utility file, and makes it all conditional on `stdout` having ANSI escape support. This makes the output more readable on LUCI, which unlike the Cirrus log display doesn't handle ANSI.

Fixes https://github.com/flutter/flutter/issues/89392
2023-07-11 19:02:59 +00:00
b4c3424fb0 [ci] Add initial LUCI legacy analysis (#4428)
Adds new legacy analysis targets to LUCI in bringup mode.

Also updates the repo tooling to use a Flutter->Dart version mapping instead of having to separately maintain a Dart version, now that we already have such a map in the tool anyway.

Part of https://github.com/flutter/flutter/issues/114373
2023-07-10 22:23:25 +00:00
f1f0f240db [tool] Update Dart SDK version (#4402)
Since the tool only needs to support back to Flutter 3.3 (the oldest version we still run CI with), this updates the tool to the corresponding minimum Dart version.

This allows the use of `super` parameters, so `dart fix --apply` was run to convert them all (and remove all the includes that were only needed for setting default values).

Also opportunistically cleans up a bunch of unnecessary, very old `dart:async` includes. (Other than those removals, the changes here are all `dart fix`-generated.)
2023-07-08 14:31:19 +00:00
12ec9fe3f0 [tool] Use 'flutter pub get' for Flutter packages (#4397)
Extracts common logic for running `pub get`, and switches commands to use it. The common logic always uses `flutter pub get` for Flutter packages, rather than `dart pub get`, since the latter will fail if someone has a non-Flutter `dart` in their path before `flutter` (e.g., Dart team members contributing PRs).
2023-07-07 20:22:19 +00:00
902e4bef4c [tool] Fix --current-package for app-facing packages (#4399)
The new `--current-package` flag was returning `foo` when run in the app-facing package of a federated plugin called `foo`, but `foo` as a package argument is treated as being the entire group, so it was running all for all of the packages in the plugin. This fixes it to return `foo/foo` in that case, which is how the tool targets app-facing packages specifically.
2023-07-07 19:04:13 +00:00
9bcf4bfa49 [ci] Add LUCI web platform tests (#4391)
Adds web platform tests for LUCI in bringup mode.

The Cirrus version of the test starts `chromedriver` at the beginning and just leaves it running, which is fine since it's a fresh docker image each run. For LUCI we don't want that behavior though, so instead this adds tooling support for running chromedriver as part of running the integration tests, controllable with a flag. This will also be useful for running locally.

Part of https://github.com/flutter/flutter/issues/114373
2023-07-07 01:10:14 +00:00
ff00264ec5 [ci] Add partial LUCI Android platform tests (#4381)
Adds an initial Android platform tests LUCI script, and initial targets in bringup mode (using 6 shards instead of the 8 we have in Cirrus since the added shards were to try to address what in retrospect was likely a device availability issue, and since for now this will be running fewer tests; once everything is migrated we can evaluate whether we need more shards).

Rather than wait for emulator and/or FTL support in LUCI to do the migration of this target, this will partially migrate; the script currently does only the parts that don't require any kind of device. That will let us set up a baseline of LUCI Android platform tests bots to easily expand from as we figure out those pieces, and we can turn down these parts of the tests in Cirrus once these come out of bringup mode to minimize duplication.

To avoid having to run a full `flutter build` for both versions, this also updates the repo tooling to use the new `flutter build apk --config-only` option to create `gradlew` without doing a full build.

Part of https://github.com/flutter/flutter/issues/114373
2023-07-06 22:48:01 +00:00
771ec9b42a [ci] Enable LUCI Dart unit tests (#4378)
Enables the new LUCI Dart unit tests.

There is no corresponding Cirrus removal because that test was
accidentally removed early in
https://github.com/flutter/packages/pull/4352.

Part of https://github.com/flutter/flutter/issues/114373
2023-07-06 10:29:55 -04:00
38745bffef [tools] Switch to flutter test (#4348)
For non-web platforms, `flutter drive` is deprecated. This switches those platforms from `flutter drive` to `flutter test`. This makes the logic to check for test driver files web-specific, since `flutter test` doesn't require a driver.

Removes support for the legacy test-in-test_driver-directory structure, which is no longer used anywhere in the repository.

Also includes a minor drive-by fix to the way we do process output, noticed while manually testing. Instead of adding all stdout, and only then adding all stderr, this adds both then waits for both, which should allow interleaving of stdout and stderr in the terminal.

Fixes https://github.com/flutter/flutter/issues/105634
2023-07-05 15:47:57 +00:00
704207985a [ci] Add a web version of Dart unit tests (#4352)
Adds new LUCI targets in bringup mode to run all possible Dart unit tests in Chrome.

This is a new test (see linked issue), not a port of a Cirrus test, so it involves changes to tooling and packages:
- The tooling now accepts an explicit platform. The default behavior if none is provided is the previous behavior of running in VM for everything but web plugin implementations (since that's convenient locally).
- The tooling now has a basic understanding of `dart_test.yaml` `test_on` directives, to know when to skip.
- Packages that don't support web have opt-out files.
- Packages that do support web but have a few tests that fail on web have those tests opted out.
- Packages that do support web but have a lot of failures on web have temporary opt-out files with TODOs + issue links.

Most of https://github.com/flutter/flutter/issues/128979
2023-07-05 00:27:25 +00:00
8b3b1ef91f [tool] Add a flag to skip cleanup (#4357)
It can be useful in debugging snippet setup to look at the extraction output, but the tool cleans that up automatically. Running the extraction manually is complicated due to the on-the-fly pubspec modifications, so this adds a `--no-cleanup` flag that can be used to skip the deletion of the extraction output, and instead log its location to the terminal.
2023-07-01 10:53:16 +00:00
48232e890b [tool] Consider comment-only changes to be dev-only (#4279)
Updates the state checker to inspect changed Dart files to see if the only changes are implementation (not documentation) comment lines. In particular, this will fix the problem of CI flagging changes that do nothing but add `// ignore:` comments (for federated package changes involving deprecation, framework changes that require temporary ignores in packages to support stable, etc.) as needing version and changelog changes
2023-06-23 17:06:07 +00:00
04bb2ac418 [tools] Fix format instructions (#4259)
The instructions for `format` failures still referred to using `activate`, which is no longer how tools are invoked. Replace the specific instructions with a link to the relevant README section to make them evergreen.
2023-06-21 20:28:09 +00:00
3b2c441370 [tools] Add mockito support to update-dependency (#4260)
Regenerates mocks when updating `mockito` using the tooling.

Fixes https://github.com/flutter/flutter/issues/124196
2023-06-21 14:02:56 +00:00