413 Commits

Author SHA1 Message Date
8411522be7 [tools] Validate pubspec topic format (#5565)
Fixes https://github.com/flutter/flutter/issues/139305
2023-12-12 16:44:27 +00:00
cb6dbcdd23 [multicast_dns] Adjust README (#5529)
- Improves link targets to be more directly useful.
- Removes the unnecessary code sections showing an import, since the install tab already demonstrates that.
- Removes the no-longer-needed exemption from the excerpt requirement.

Part of https://github.com/flutter/flutter/issues/102679
2023-12-09 09:06:19 +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
5e81fd5d67 [google_sign_in_web] Migrate to pkg:web. (#5612)
This PR updates `google_sign_in_web` to:

* Use the latest `google_identity_services_web` and `http`
* Use `package:web`

This should allow the package to compile to WASM.

## Issues

* Fixes https://github.com/flutter/flutter/issues/139169
* Needed to https://github.com/flutter/flutter/issues/139170 

## Tests

* All tests should pass (ran locally)
* Demo app compiled to WASM: https://dit-gis-test.web.app
2023-12-09 01:07:05 +00:00
15584a394d [gis_web] Migrate to package:web. (#5581)
* Migrates package to use `package:web` so it can be compiled with WASM.
* **Breaking change**: Addresses API mismatches with the latest JS SDK changes.
* Adds some tests to client configuration objects.

(See CHANGELOG.md for a more thorough list of changes)

## Issues

* Fixes: https://github.com/flutter/flutter/issues/138202
* Fixes: https://github.com/flutter/flutter/issues/139167
  * Part of: https://github.com/flutter/flutter/issues/139170

## Tests

* Ran unit/integration tests locally, added a couple more.
* Tested example apps with `flutter run`, both seem to work.
* Tested example apps with `--wasm`, both seem to work.
2023-12-07 06:55:27 +00:00
44a8ce1d55 [flutter_image] Adopt code excerpts in README (#5498)
Updates the README to use a compiled excerpt source for its example of using `NetworkImageWithRetry`.

Part of [flutter/flutter#102679](https://github.com/flutter/flutter/issues/102679)
2023-12-01 14:22:33 +00:00
14093051d0 [quick_actions_android] Run tests on AVDs running Android 34 (#5220)
Run `quick_actions_android` tests on AVDs running Android 34.
2023-11-27 15:10:06 +00:00
2102327ab9 [cross_file] adopt code excerpts in README (#5347)
Updates the README to use a compiled excerpt source for its example of instantiating an `XFile`.

Part of [flutter/flutter#102679](https://github.com/flutter/flutter/issues/102679)
2023-11-22 10:01:13 +00: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
bc145f4dd6 [path_provider_android] Run tests on AVDs running Android 34 (#5222)
Run `path_provider_android` tests on AVDs running Android 34.

Part of https://github.com/flutter/flutter/issues/137082.
2023-11-18 00:42:19 +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
29a01642fb [file_selector_android] Run tests on AVDs running Android 34 (#5218)
Run `file_selector_android` tests on AVDs running Android 34.

Result of https://github.com/flutter/flutter/issues/135756.
2023-10-25 16:37:05 +00:00
3cc6e26ea8 [Android] Introduces API 34 emulators for subset of tests (#5105)
Introduces API 34 emulators for subset of tests not causing test failures in https://github.com/flutter/packages/pull/4804. Also changes linux_android version to 34v1.

Continuation of https://github.com/flutter/packages/pull/4820.
2023-10-24 17:25:52 +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
f95d53480a [ci] Add emulator tests on older Android version (#4616)
Adds new tasks to run integration tests on legacy Android emulators (API 22, since we don't currently have API 21 emulators available), so that we are getting more complete coverage of our supported OS versions.

For now, excludes several plugins with TODOs and issues filed, so that the suite can be brought online in parallel with investigation of those issues.

Most of https://github.com/flutter/flutter/issues/130010
2023-10-19 18:51:06 +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
9804d951b4 [process] Import the process package (#5095)
Imports the `process` platform from https://github.com/google/process.dart
- As there is not much history in the package, this imports it as a copy instead of going through the process of actually merging the commit history of that repo into this one.
- The only changes relative to the current source in that repo are adjustments for repo conventions (such as updating pubspec.yaml, and running `dart fix --apply` after removing the custom analysis options in order to bring it into alignment with repo analysis options).

Fixes https://github.com/flutter/flutter/issues/130915
2023-10-09 20:24:18 +00:00
c3cc4d86dd [ci] Disable maps tests in Android emulator (#5003)
When the emulator tests for Android were brought up, `google_maps_fluter_android` was excluded due to flake. We're also seeing high flake from `google_maps_flutter` on Android, so disabling that as well.

We continue to have coverage of these tests via FTL, so it's only the relatively new emulator version that is being disabled here.

See https://github.com/flutter/flutter/issues/130986
2023-09-29 19:53:05 +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
21c2ebb39c [Android] Add new tasks for subset of tests to run API 33 (#4974)
Adds new tasks to create shards to run a subset of Android platform tests on API 33 AVD tests when the update to run tests on AVDs with API 34 lands due to test failures on a subset of plugins. Prequel PR to https://github.com/flutter/packages/pull/4820.
2023-09-26 18:58:22 +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
0a86513485 [ci] Enable ios_platform_images tests (#4920)
https://github.com/flutter/packages/pull/4899 added integration tests, but I forgot that they were being excluded in CI. This enables them.

Fixes https://github.com/flutter/flutter/issues/82208
2023-09-14 20:34:41 +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
470a325e11 [flutter_markdown] Adopt code excerpts in README (#4656)
Updates the README to use a compiled excerpt source for its example of creating a `Markdown`.

Part of https://github.com/flutter/flutter/issues/102679
2023-08-07 20:02:36 +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
ff81b82176 [camera_web] Adopt code excerpts in README (#4584)
Updates the README to use a compiled excerpt source for its example of creating an `Image`.

Part of https://github.com/flutter/flutter/issues/102679
2023-08-04 18:23:53 +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
2481d92950 [ci] Enable Android emulator-based tests (#4494)
Adds emulators to the Android platform test tasks, and enable both native integration tests and `flutter test` Dart integration tests. This finally gives us presubmit coverage of Android integration tests for non-team-member PRs, as well as giving us a path to reducing the dependency on FTL for all of our Android testing.

Currently this uses Android 13 emulators; we could expand this to a set of legacy version emulator tests in the future once this is in place.

Some specific notes:
- Camera and Google Maps tests are currently excluded, so that we can enable everything else while we work on the blockers for those.
- `shared_preferences` was missing its debug entitlement, which prevented the debug service from running, and thus broke `flutter test`; we'd just never noticed because FTL tests don't need that mechanism to work.
- IAP was using `test` instead of `testWidget`, which we only check for in `drive-examples`, so hadn't noticed.

Fixes https://github.com/flutter/flutter/issues/93810
2023-07-24 20:48:19 +00:00
e06061ce52 [ci] Clean up except exclusion list (#4547)
Removes several entries from the exclusion list where the packages no longer need to be there (e.g., because they had Dart excerpts at some point, but no longer do).

Part of https://github.com/flutter/flutter/issues/102679
2023-07-21 23:10:23 +00:00
e6a71440d8 [go_router] Remove unused dependency (#4545)
Removes `adaptive_dialog` from the example pubspec, as it is not used, and removes the repository allowance for it.

Also updates the comments for the remaining pinned dependency exceptions to reflect the results of the audit.

Part of https://github.com/flutter/flutter/issues/130897
2023-07-21 17:35:51 +00:00
1af4d1a40a [go_router_builder] Removes path_to_regexp from the dependencies (#4524)
Fixes https://github.com/flutter/flutter/issues/130817
Relates to https://github.com/flutter/flutter/issues/122713

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2023-07-21 16:07:51 +00:00
05fdd1337f [plugin_platform_interface] Adopt code-excerpts (#4534)
Updates the README to use code excerpts from the unit test file, adjusting the existing test code slightly to make it suitable for use in the example.

Also fleshes out the example a bit more, to make it look more like a real class.

Finally, adds a note about `base`, linking to the ongoing discussion, since we don't have a decision yet, but people may well wonder why this class exists given `base`.

Part of https://github.com/flutter/flutter/issues/102679
2023-07-20 21:14:10 +00:00
dc41cccbe3 Remove equatable and xml allowances (#4489)
The only package that was using the `equatable` package removed it, so we no longer need this allowance.

The only package depending on `xml` was `flutter_migrate`, but it never actually used it, so that can be removed as well.

Part of https://github.com/flutter/flutter/issues/122713
2023-07-17 18:56:02 +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
aaebc6ee03 [rfw] Add some more documentation for RFW (#4349) 2023-07-12 07:12:01 +00:00
6fbc9f9018 [ci] Remove unused Chromium setup (#4437)
The tasks that used the Cirrus template and shell script to install a specific version of Chromium have been migrated to LUCI, so this is cruft; I forgot to remove it when finishing that migration.

Also combines two setup steps into one template now that they are only used together.
2023-07-11 22:47:33 +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
e479ca5d82 [ci] Remove webview_flutter implementation opt outs for custom analysis (#4438)
https://github.com/flutter/flutter/issues/127323 has been closed and the packages no longer have the custom analysis files.
2023-07-11 20:27:53 +00:00