45 Commits

Author SHA1 Message Date
68ccd8c152 [various] Unpin some dev dependencies (#7762)
Several dev dependencies, most notably mockito, were only allow as exactly pinned versions, in order to avoid out-of-band breakage due to deprecations in minor version updates. Now that the policy for Flutter repos has changed to not include deprecation warnings in analysis, this is no longer an issue, so we can relax these dependencies to follow the more normal pattern of using ranges.
2024-10-02 19:06:20 +00:00
5cc0a01601 [ci] Update repository for the release of Flutter 3.24 (#7331)
Updates the repo for 3.24 per https://github.com/flutter/flutter/blob/master/docs/ecosystem/release/Updating-Packages-repo-for-a-stable-release.md

Also fixes some packages to list 3.22 as their minimum version, which hadn't already been done only because we were not previously doing the N-1 test for 3.19 as intended, so didn't notice cases where a package claimed 3.19 support but required a 3.22+ dependency.
2024-08-07 17:36:03 +00:00
788b666693 Update the repo for the 3.22 stable release (#6730)
Does all of the steps of https://github.com/flutter/flutter/wiki/Updating-Packages-repo-for-a-stable-release other than the first (which is https://github.com/flutter/packages/pull/6727).
2024-05-15 13:57:06 +00:00
cc34b78a0c [ci/various] Update for 3.19 stable (#6147)
Does the steps from https://github.com/flutter/flutter/wiki/Updating-Packages-repo-for-a-stable-release to account for stable now being 3.19, and N-2 (and thus our minimum supported min version) being 3.13.

These changes are version-bump-exempt [by repo policy](https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version).
2024-02-16 17:34:11 +00:00
31fc7b5dd0 bump mockito across repo to 5.4.4 (#5794)
Bump mockito from 5.4.3 -> 5.4.4 via tool_runner
2024-01-04 14:50:19 +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
ee261514e1 [various] Update mockito to 5.4.3 (#5530)
Updates to the latest version of `mockito`.

This PR is entirely tool-generated, using the `update-dependency --pub-package=mockito` repo tooling command.
2023-12-04 18:15:57 +00:00
a8bb8330c3 [plugin_platform_interface] Switch mixin to mixin class (#5420)
The test mixin is currently declared as a `class`, which causes problems for projects with a minimum Dart version of 3.0. This switches it to `mixin class`; ideally it would just be a `mixin`, but in theory that could break something, so since this is such a core package in the ecosystem we want to be as conservative as possible. (While the breaking change would only in theory happen to test code, it's possible that someone ignored the `visibleForTesting`, and we have an easy way to avoid the possibility entirely.)

Fixes https://github.com/flutter/flutter/issues/123241
2023-11-17 20:48:38 +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
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
dd0d2bf075 bump mockito to version 5.4.1 (#4085)
Part of https://github.com/flutter/flutter/issues/127226

Follow up to https://github.com/flutter/packages/pull/3544. Version 5.4.0 from that PR is not new enough, see

```
Because mockito >=5.4.0 <5.4.1 depends on test_api >=0.2.1 <0.6.0 and every version of flutter_test from sdk depends on test_api 0.6.0, mockito >=5.4.0 <5.4.1 is incompatible with flutter_test from sdk.
So, because quick_actions_platform_interface depends on both flutter_test from sdk and mockito 5.4.0, version solving failed.
```

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8780090492483790881/+/u/run_test.dart_for_flutter_plugins_shard_and_subshard_analyze/test_stdout
2023-05-26 15:23:50 +00:00
199fc68a1a Roll mockito to 5.4.0 (#3544)
Roll mockito to 5.4.0
2023-03-30 12:12:38 +00:00
e893fdc961 [all] Update Dart SDK max to 4.0.0 (#3509)
* Update script command

* Mass change
2023-03-21 21:48:58 -07:00
9b136a9ce3 [ci/tool] Add external dependency validation (#3466)
[ci/tool] Add external dependency validation
2023-03-17 03:01:18 +00:00
25f0f702e5 [various] Update flutter/plugins links (#3256)
Updates links and references to `flutter/plugins` to use `flutter/packages` instead, including making the `repository` pubspec.yaml check stricter in the repo tooling to ensure all packages are pointing to the right place.

Exceptions to the updates are:
- Changelog entries.
- Links to pull requests.

This will re-publish all the moved plugins, thus fixing the current redness of `release` (due to the current versions not being tagged in this repository).
2023-02-22 13:45:11 -05:00
46e64f38ad [tool/ci] Add minimum supported SDK validation (#7028)
Adds options to `pubspec.yaml` to check that the minimum supported SDK range for Flutter/Dart is at least a given version, to add CI enforcement that we're updating all of our support claims when we update our tested versions (rather than it being something we have to remember to do), and enables it in CI.

As part of enabling it, fixes some violations:
- path_provider_foundation had been temporarily dropped back to 2.10 as part of pushing out a regression fix.
- a number of examples were missing Flutter constraints even though they used Flutter.
- the non-Flutter `plugin_platform_interface` package hadn't been update since I hadn't thought about Dart-only constraints in the past.
2023-01-26 13:28:41 -05:00
dcf8e70e6c [plugin_platform_interface] Switch PlatformInterface._instanceToken to an expando. (#6411)
This change replaces `PlatformInterface._instanceToken` (an instance
field that points from a `PlatformInterface` to its corresponding
token) with an expando that maps from `PlatformInterface` to `Object`.
There is no change to the public API, and no change to the behavior of
users' production code.

This change ensures that if a customer tries to implement
`PlatformInterface` using `implements` rather than `extends`, the code
in `PlatformInterface._verify` won't try to access the private
`_instanceToken` field in `PlatformInterface`.  This is important
because an upcoming change to the dart language is going to cause such
accesses to throw exceptions rather than deferring to `noSuchMethod`
(see https://github.com/dart-lang/language/issues/2020 for details).

Fixes https://github.com/flutter/flutter/issues/109339.
2022-09-15 09:53:28 -07:00
aed9e468db [various] Remove pedantic (#6179) 2022-08-03 19:52:05 +00:00
2cb019467f 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
6199faf2eb [all] Update repo links to 'main' (#4690) 2022-01-24 20:25:15 -08:00
f730069a44 [plugin_platform_interface] Test that PlatformInterface and MockPlatformInterfaceMixinTest have no instance methods (#4659) 2022-01-20 14:05:22 -08:00
98d4f04737 [plugin_platform_interface] Update README and add a test (#4652) 2022-01-07 16:00:21 -08:00
62086bc93a [plugin_platform_interface] Fix 'verify' for Fakes (#4651)
The new `verify` method worked with `Mock` (since `_instanceToken`
returns a stub function in that case), but not `Fake` or a manual fake
since it was unconditionally accessing `_instanceToken`. This fixes that
new check to be gated behind the `MockPlatformInterfaceMixin` test, and
adds a unit test that covers `Fake` so this can't regress in the future.

Fixes post-publish breakage in the tree.
2022-01-07 10:01:18 -08:00
4960d181a8 [plugin_platform_interface] Add a new method verify that prevents use of const Object() as token. (#4640)
- Introduce `verify`, a more future-proof name. It throws `AssertionError` if `const Object()` used as the instance's token. 
- Soft-deprecate `verifyToken` with a comment. It will actually deprecated in a future release, to avoid breaking tests with this minor change.
- Update documentation for `PlatformInterface` to show new usage of `verify` and other cosmetic fixes.
- Add a test for the new assertion.

Fixes https://github.com/flutter/flutter/issues/96178.
2022-01-05 17:43:43 -08:00
83870c3dc8 [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
9ba44087d0 Remove some trivial custom analysis options files (#4379)
Remove a few of the trivial-to-fix legacy analysis option files that were bulk added in the transition to matching flutter/flutter's analysis options.

Part of flutter/flutter#76229
2021-09-23 19:38:20 -07:00
9a13f49317 [plugin_platform_interface] Fix README broken link (#4143) 2021-07-08 00:01:06 -07:00
03796dd79b Add pubspec convention checks (#3984) 2021-05-27 20:54:06 -07:00
22f913cba9 Clean up cruft in pubspec.yaml files (#3972)
- Standardize on mockito 5.0 now that the conflicts with SDK packages is
  resolved on stable.
- Removes overrides that were only needed for Flutter 2.0
- Update a -nullsafe inter-package dependency
- Update some older federated examples that used dependency_overrides to
  depend on its encloding package by path to the now-standard option of
  listing that path-based dependency directly.
2021-05-25 06:28:53 -04:00
22cfecb729 Mass pubspec.yaml cleanup (#3927)
Regularizes the pubspec.yaml files of the plugins:
- Changes from `homepage` to `repository` to improve the linking on pub.dev.
- Adds an `issue_tracker` link that links directly to a search on that plugin's label, to improve the linking on pub.dev.
- Standardizes the section order as `environment`, `flutter`, `dependencies`, `dev_dependencies`. This matches the current template, except that `flutter` is higher as it's critical information in a plugin (which should potentially be revisited in the template).
- Sorts dependencies within each section.
- Updates the Flutter SDK versions to 2.0.0; in practice this is already the case due to the Dart SDK version requirement, so this just makes it less confusing.
- Standardizes the location of `version` in the initial block.

Changes that were considered out of scope:
- Actually cleaning up dependencies (e.g., removing meta where it's no longer needed). The goal was to make this PR as mechanical as possible, and to not change any actual behavior).
- The example/ pubspecs (just to limit the scope of the PR; we should eventually clean those up too).
- Plugins that have Plus Plugin equivalents, per repo policy, as this is a non-critical change.

This does not update versions; these changes can be picked up the next time the plugins happen to be published.

This also doesn't add automated enforcement. We should consider that in the future though; filed as https://github.com/flutter/flutter/issues/82913
2021-05-21 08:33:58 -07:00
d46295aec2 Move all null safety packages' min dart sdk to 2.12.0 (#3822) 2021-04-23 10:19:03 -07:00
ac485a13b0 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
dc89b57662 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
fd254196bd Add an AUTHORS file to each plugin (#3725)
This ensures that the AUTHORS list is distributed with the plugins whose copyright blocks refer to the project authors, for ease of reference. This is currently a copy of the top-level authors list, but over time they are expected to diverge as people contribute to specific plugins.

This does not bump plugin versions or CHANGLELOGs, since it has no effect on the plugin itself; it will be picked up over time as we ship new versions of plugins.

Part of https://github.com/flutter/flutter/issues/78448
2021-03-18 10:00:10 -07:00
5406a9db55 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
b3aa900218 Migrate plugin_platform_interface to v2 stable, null-safe (#3543) 2021-02-18 13:45:01 -08:00
b5a5f68235 [plugin_platform_interface] Use Mockito nnbd (#3437) 2021-01-15 19:14:03 -08:00
3d3c08d089 Remove custom null safety analysis_options files (#3339) 2020-12-16 11:33:04 -08:00
a5c9c5635c Merge null-safety plugins (#3324) 2020-12-14 13:33:59 -08:00
7cd1c0c172 [plugin_platform_interface] Fix homepage in pubspec.yaml (#3088)
Fixes https://github.com/flutter/flutter/issues/66844
2020-09-29 13:09:42 -07:00
b305e18994 Standardize LICENSE body text formatting (#2992)
This cleans up a number of unnecessary differences in the LICENSE files:
- Removes C++ comments ("// ") from the beginnings of all the lines in license files that had them.
- Standardizes on having a blank line after the copyright line.
- Standardizes on having the final newline in the file.
- Standardizes on the indentation of the bulleted conditions.
- Standardizes on the locations of line breaks (re-wrapping the text)

This makes the license bodies--not including the copyright line--in almost all files the same, and matches the exact formatting already used in flutter/flutter and flutter/engine.

The only remaining non-copyright-line differences should now be:
- packages/image_picker/image_picker/LICENSE has an extra license
- packages/google_sign_in/extension_google_sign_in_as_googleapis_auth/LICENSE use "Google LLC" rather than "Google Inc." in the third condition.
2020-09-03 11:13:34 -07:00
abaa0b4bf4 add dev_dependency:pedantic to all plugins (#2543) 2020-02-20 15:41:18 -08:00
95d6107ed2 [plugin_platform_interface] Don't use const Object as a token (#2417) 2019-12-13 12:20:43 -08:00
ba1d50793d Add a plugin_platform_interface package (#2348)
Adds a package with a common base class for platform interface.

The PlatformInterface class provides common functionality for enforcing that platform implementations extend the platform interface with extends rather than implement it with implements.

This is based on the existing code from the url_laucher_platform_interface, and the improvements proposed in #2326
2019-12-10 13:15:02 -08:00