403 Commits

Author SHA1 Message Date
92238bf6bc [vector_graphics] Initial import (#7941)
Imports https://github.com/dnfield/vector_graphics into this repository,
with history, and updates it to follow repository conventions:
- Adds missing licence headers.
- Removes analysis options and fixes resulting warnings.
- Updates min SDKs.
- Autoformats.
- Updates pubspecs to follow repo standard, including updating the
metadata
  to point to the Flutter repositories.
- Allows `xml` as a pinned dependency, and relaxes the pinning
requirement
  in the repo tools to allow an explicit, inclusive-endpoint range.
- Skips some unit tests on unsupported platforms.
- Adds repo metadata.
- Bumps versions and slightly relax version constraints to allow the new
  versions.
2024-10-31 10:35:33 -07:00
ed7ee79e4c [ci] Ensure repo tool is autoformatted (#7963)
Currently the autoformatter check is run per-package, so doesn't include script/tool. This adds a new CI step to check the formatting of the repo tooling, just as we have for running its unit tests.
2024-10-30 23:10:15 +00:00
cd7a810444 [tool] Support third_party for --current-package (#7967)
Fixes `--current-package` so that when run on a package in third_party/packages/ in works as expected, rather than failing with an error message saying that it must be run from inside a package.
2024-10-30 22:51:05 +00:00
030dd4eafa [tool] Fix third_party dependency overrides (#7966)
`made-deps-path-based` would sometimes create invalid relative paths when `third_party/packages` was involved because it was using the sibling directory of `packages` as the base. This updates the logic to always make the paths relative to the repository root; this is often a longer relative path than necessary, but that's harmless, and always using the repo root makes it easier to reason about.

Also fixes the fact that paths that were already path based (which is always the case for `some_package/example`'s dependency on `some_package`) were being overridden, causing CI to do some unnecessary duplicate analysis work.
2024-10-30 22:36:55 +00:00
4feddffcfa Applied Gradle Plugins Declaratively for path_provider (#7822)
Updated applying gradle plugins from usage of imperative apply to usage
of declarative blocks {} apply. Intending on updating all android
example apps under packages. Did one more as a proof of concept before
doing more.

More information on Flutter Gradle Plugin Apply
[here](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply)

Partially addresses
[#152656](https://github.com/flutter/flutter/issues/152656)
## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] page, which explains my
responsibilities.
- [x] I read and followed the [relevant style guides] and ran the
auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages
repo does use `dart format`.)
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [x] I [linked to at least one issue that this PR fixes] in the
description above.
- [x] I updated `pubspec.yaml` with an appropriate new version according
to the [pub versioning philosophy], or this PR is [exempt from version
changes].
- [x] I updated `CHANGELOG.md` to add a description of the change,
[following repository CHANGELOG style], or this PR is [exempt from
CHANGELOG changes].
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md
[relevant style guides]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[CLA]: https://cla.developers.google.com/
[Discord]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[linked to at least one issue that this PR fixes]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning
[exempt from version changes]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version
[following repository CHANGELOG style]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style
[exempt from CHANGELOG changes]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog
[test-exempt]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests

---------

Co-authored-by: Reid Baker <reidbaker@google.com>
2024-10-30 12:38:55 -07:00
7cc1caa0cc [tool] Update build-all app creation (#7955)
Minor cleanup of the script to create the build-all app, mostly for Android:
- Don't override the minSdk to 21, since the Flutter-provided value is now 21 already.
- Don't enable multidex, since that isn't necessary for minSdk 20+.
- Remove camera_android_camerax from the direct dependency list, not camera_android, now that the endorsement has switched. This will return us to the previous, intended behavior of testing that both versions build together.
- If for some reason the Dart SDK isn't detected, use 3.0.0+ instead of 2.12.0+.
2024-10-30 09:50:04 +00:00
a1bfadf6fd Update vector_graphics to match repo conventions
- Add missing licence headers.
- Remove analysis options fix new warnings.
- Update min SDKs.
- Autoformat.
- Update pubspecs to follow repo standard.
  - Includes removing dependency overrides for inter-package path
    pinning as a default state; this can be added temporarily in PRs
    with repo tooling.
- Allow xml dependency, and relax the pinning requirement to allow an
  explicit, inclusive-endpoint range.
- Skip tests on unsupported platforms.
- Switch vector_graphics_codec from flutter_test to test.
- Add repo metadata.
- Add commemoration to the README.
- Add AUTHORS files.
- Bump versions and slightly relax version constraints to allow the new
  versions.
2024-10-28 14:50:30 -04:00
3727fa0af5 Merge branch 'main' into import-path-parsing 2024-10-24 12:36:49 -07:00
dade4c7479 Update license check to find and recognize this license 2024-10-24 13:10:31 -04:00
a556f0f528 [camera] Manual roll and skip failing tests (#7891)
See https://github.com/flutter/flutter/issues/157181

Also updates the `build_all_packages` test to handle `android/app/build.gradle(.kts)` filename.
2024-10-24 15:17:17 +00:00
cebc06cbd7 Manual roll Flutter from 6bba08cbcc51 to 0975e612c04a (1 revision) (#7814)
Manual roll requested by stuartmorgan@google.com

6bba08cbcc...0975e612c0

2024-10-01 51940183+Sameri11@users.noreply.github.com [tool][android]
Allow --target-platform work properly with --debug mode
(flutter/flutter#154476)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC camillesimon@google.com,stuartmorgan@google.com on the revert
to ensure that a human
is aware of the problem.

To file a bug in Packages:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

---------

Co-authored-by: Stuart Morgan <stuartmorgan@google.com>
2024-10-08 08:14:04 -04:00
5cda4c673a Manual roll Flutter from ead6b0d17c89 to 6bba08cbcc51 (37 revisions) (#7809)
Manual roll Flutter from ead6b0d17c89 to 6bba08cbcc51 (37 revisions)

Manual roll requested by stuartmorgan@google.com

ead6b0d17c...6bba08cbcc

2024-10-01 a.a.ustinoff@gmail.com  Feat: Add opportunity to change CupertinoTextField suffix alignment (flutter/flutter#154601)
2024-10-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from da28db8ff41d to 3fdb546bf595 (2 revisions) (flutter/flutter#155993)
2024-10-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6b21b796cc94 to da28db8ff41d (1 revision) (flutter/flutter#155985)
2024-10-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 259f56c6e91b to 6b21b796cc94 (1 revision) (flutter/flutter#155983)
2024-10-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6ee04ed763d9 to 259f56c6e91b (1 revision) (flutter/flutter#155981)
2024-10-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from bfb6dddb2b30 to 6ee04ed763d9 (3 revisions) (flutter/flutter#155978)
2024-10-01 engine-flutter-autoroll@skia.org Roll Flutter Engine from e61bc853acb2 to bfb6dddb2b30 (8 revisions) (flutter/flutter#155967)
2024-10-01 katelovett@google.com Disable flaky menu test  (flutter/flutter#155968)
2024-10-01 robert.ancell@canonical.com Fix crash in Linux platform channel example. (flutter/flutter#155735)
2024-09-30 polinach@google.com Fix leak in input_decorator [prod-leak-fix] (flutter/flutter#155885)
2024-09-30 rmolivares@renzo-olivares.dev Move platform specific text selection behavior out of styled TextField classes (flutter/flutter#155774)
2024-09-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from b466a0dd7834 to e61bc853acb2 (5 revisions) (flutter/flutter#155952)
2024-09-30 rmolivares@renzo-olivares.dev `RenderParagraph`s `_SelectableFragment.boundingBoxes` should consider max line height (flutter/flutter#155892)
2024-09-30 engine-flutter-autoroll@skia.org Roll Packages from 0321757447bf to 27c98537ccac (3 revisions) (flutter/flutter#155945)
2024-09-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from f4507e7a4beb to b466a0dd7834 (1 revision) (flutter/flutter#155944)
2024-09-30 andrewrkolos@gmail.com when `ResidentRunner.tryInitLogReader` fails, only log warning on Android (flutter/flutter#155800)
2024-09-30 gordin.dan@gmail.com Move FlutterLogo from material to widget (flutter/flutter#155864)
2024-09-30 lizhuo.huang@outlook.com fix: support android 15 16k page size for template plugin_ffi  (flutter/flutter#155508)
2024-09-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from daf126b38b8f to f4507e7a4beb (1 revision) (flutter/flutter#155932)
2024-09-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 734205fbcd62 to daf126b38b8f (1 revision) (flutter/flutter#155929)
2024-09-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 338f09c4ea72 to 734205fbcd62 (1 revision) (flutter/flutter#155923)
2024-09-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 897f5caffe2d to 338f09c4ea72 (2 revisions) (flutter/flutter#155917)
2024-09-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 569abc4044b8 to 897f5caffe2d (1 revision) (flutter/flutter#155912)
2024-09-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from c4784aa7eade to 569abc4044b8 (2 revisions) (flutter/flutter#155894)
2024-09-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from ff4541712df4 to c4784aa7eade (2 revisions) (flutter/flutter#155889)
2024-09-28 50643541+Mairramer@users.noreply.github.com Fixes column text width calculation in CupertinoDatePicker (flutter/flutter#151128)
2024-09-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 380fd814448c to ff4541712df4 (1 revision) (flutter/flutter#155886)
2024-09-28 tessertaha@gmail.com Optimize `Overlay` sample to avoid overflow (flutter/flutter#155861)
2024-09-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from f3b11bcd9c37 to 380fd814448c (1 revision) (flutter/flutter#155876)
2024-09-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from 9c8e5cb226e4 to f3b11bcd9c37 (3 revisions) (flutter/flutter#155865)
2024-09-28 engine-flutter-autoroll@skia.org Roll Flutter Engine from f9e4ed28f103 to 9c8e5cb226e4 (1 revision) (flutter/flutter#155857)
2024-09-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from f21f2b232b8a to f9e4ed28f103 (2 revisions) (flutter/flutter#155855)
2024-09-27 45459898+RamonFarizel@users.noreply.github.com Add  magnificationScale to CupertinoMagnifier for Zoom Effect (flutter/flutter#155276)
2024-09-27 iNoles@users.noreply.github.com Fix typo on theme_data (flutter/flutter#155644)
2024-09-27 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7c603de2dca7 to f21f2b232b8a (6 revisions) (flutter/flutter#155843)
2024-09-27 34871572+gmackall@users.noreply.github.com Turn the packages roller bot back on (flutter/flutter#155842)
2024-09-27 engine-flutter-autoroll@skia.org Roll Packages from f38b780f530f to 0321757447bf (4 revisions) (flutter/flutter#155832)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC camillesimon@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

...
2024-10-08 09:43:38 +00:00
4afc383a6d [various] Update Java compatibility version to 11 (#7795)
Now that `stable` requires AGP 7.0, which in turn requires Java 11+, we should be able to set our compatibility version to 11 (setting the min Flutter SDK version to current stable).

Also removes the gradle conditionals for setting namespace (and the repo tool checks that it is present), as that was only needed for AGP 4.1 compatibility.

Part of https://github.com/flutter/flutter/issues/156111
2024-10-05 12:06:33 +00:00
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
21d99dcc16 [various] Adds macOS privacy manifests (#7687)
macOS privacy manifest enforcement is rolling out soon, so this brings all macOS plugins into alignment with our iOS policy of always having a manifest, including updating the repo tooling to enforce that.

Very few plugins are affected because most share the implementation package with iOS, and we didn't do any target platform switching when adding the manifests for iOS, automatically covering macOS as well.

Fixes https://github.com/flutter/flutter/issues/155564
2024-09-24 01:16:06 +00:00
b39fc07f44 [script] Remove unnecessary breaks in default clauses of switch statements (#7469)
See
https://dart.googlesource.com/sdk.git/+/045d26bc74209f5acc6466669f89686344e83de2
2024-08-21 13:49:10 -04:00
9cc09f13d0 [Many] Bump AGP to 8.5.1 and gradle to 8.7 (#7432)
Upgrades all AGP versions less than 8 to latest. The primary motivation is to prepare for https://github.com/flutter/flutter/issues/136879#issuecomment-2292073921, which requires that plugins use a non-7.3 version. We believe it only affects version 7.3 - I'm going to test this, but am not sure the exact range yet and updating is independently valuable, so I just updated all pre 8 versions (it doesn't affect 8+).

Also:
- Upgrades Gradle versions as required
- Marks the use of `Camera2Interop` with `@OptIn`, as it is required by the newer AGP version.
- Changes the Camerax example java directory path to align with the package xml attribute/AGP namespace attribute.
- Sets `android.buildFeatures.buildConfig` to true for compatibility with AGP 8.0+ in some places.
- Sets `exported=true` in a manifest, requires for AGP bump.
- Updates espresso in some examples, required by the AGP bump (0.2.0 isn't compatible with AGP 8.0+).

Also related to https://github.com/flutter/flutter/issues/146660
2024-08-20 19:02:09 +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
cc9ff47058 [tool] Add note about clang version used in CI to tool readme (#7273)
This repo uses clang 15 to format files. Newer versions of clang format code differently. This PR adds a note to the tool README about this and adds sample instructions for how to install clang 15 on macOS. We might want to add instructions for other platforms.

Fixes https://github.com/flutter/flutter/issues/152651

Additional context
- https://github.com/flutter/packages/pull/7267
- https://github.com/flutter/packages/pull/7271
2024-08-02 13:05:24 +00:00
f8fbcdbe95 [ci] version_check_command now checks markdown of first CHANGELOG line. (#7266)
This PR:

* Modifies the `version_check_command` test so it checks the leading markdown of the first line of a CHANGELOG file, to ensure it's `'##'`.
* Fixes the CHANGELOG in two packages that were allowed by the tool before this fix:
  * google_maps_flutter_web
  * interactive_media_ads

## Issues

Fixes https://github.com/flutter/flutter/issues/152638
2024-08-01 01:33:18 +00:00
5513396a72 [tool] Run pre_publish.dart before publish --dry-run (#7258)
When running publish-check, any pre-publish hook must be run before the `publish --dry-run` step as the latter succeeding may depend on the former.

Part of https://github.com/flutter/flutter/issues/150210
2024-07-31 16:03:04 +00:00
3d358d921a [many] Ignore NewerVersionAvailable in android lint (#7218)
- **Updates android lint to ignore NewerVersionAvailable**
- **Update changelog**

Fixes https://github.com/flutter/flutter/issues/152316
2024-07-26 14:22:18 +00:00
0489bdac9f [tool] Adds --wasm flag to the drive-examples command (#7162)
I was unsure if we wanted to add a new platform option for this or add a `--wasm` flag to the command. Adding a `--wasm` flag seems more complicated since we would probably want to add extra handling around proper use of the flag, whereas adding a `web-wasm` platform should require no additional checks.

This is in preparation for https://github.com/flutter/flutter/issues/151664
2024-07-25 23:30:57 +00:00
50238e7dd3 [tool] Add a package-level pre-publish hook (#7156)
Adds the ability for a package to specify a script that should be run before publishing. To minimize the chance of such a script breaking things only in the post-submit `release` step, if the script is present it will also be run during `publish-check`.

These should be used with caution since they can cause the published artifacts to be different from that is checked in, but in the intended use case of extension builds this risk is far preferable to the risks associated with checking in binaries that were built on local, ad-hoc basis. (Longer term, we may need an alternate solution however, as generating artifacts in CI can have its own supply chain validation issues.)

Also does some minor refactoring to custom test script code to make it follow the same pattern as this new code.

Fixes https://github.com/flutter/flutter/issues/150210
2024-07-25 20:06:18 +00:00
c7f052697a [flutter_plugin_tools] Allow disabling Swift Package Manager when building examples (#7145)
You can use the Flutter plugin tool to [build the plugins' examples apps](https://github.com/flutter/packages/tree/main/script/tool#run-dart-integration-tests). Currently, the tool can enable the Swift Package Manager feature.

This change allows the tool to disable the Swift Package Manager feature. This will be useful for when SPM is enabled by default on a release channel.

Preparation for: https://github.com/flutter/flutter/issues/151567
2024-07-18 16:39:07 +00:00
8cf4d96f47 [ci] Drive tests with html renderer if CHANNEL is stable. (#7146)
Introduces a small fork in the `drive_examples_command` to run integration tests with `--web-renderer=html` in the `stable` channel (and `--web-renderer=canvaskit` in `master`).

This is supposed to be removed, once the current `master` rolls into `stable` (see clean-up issue referenced below).

## Issues

* Part of: https://github.com/flutter/flutter/issues/143543
* Prevents flakes: https://github.com/flutter/packages/pull/7115#issuecomment-2226661488
* Clean-up issue: https://github.com/flutter/flutter/issues/151869
2024-07-17 21:52:24 +00:00
da04812172 [ci][web] Run tests in canvaskit mode. (#6879)
Configures the flutter/packages CI to run web tests using the `canvaskit` renderer, which is the new default for web apps.

It also does some minor changes:

* Skips tests on the web for `package:palette_generator` (cleanup issue created below)
  * Makes the `palette_generator` example run on the web. This was used to manually verify that the package still works as expected with canvaskit.
* Tweaks the README of the `pointer_interceptor` example apps, so they match what's happening in there.

## Issues

* Fixes https://github.com/flutter/flutter/issues/143543

Co-authored-by: David Iglesias <ditman@gmail.com>
2024-07-11 21:04:54 +00:00
69e7fc1590 [tools] Fix vm test requirement (#6995)
The logic for handling Dart unit test `test_on` directives was incorrect, causing it to skip packages that required vm testing, even when run in vm mode. This PR:
- Adds the missing tests for false negatives.
- Reworks the logic to explicitly fail for anything that isn't one of the exact patterns we are expecting, to make it much harder to re-introduce a bug like this in the future.
2024-06-27 14:32:38 +00:00
71b2f6829c [various] Update flutter.dev links to more reliable destinations (#6963)
Contributes to https://github.com/flutter/website/issues/10363 by updating to the latest links and updating some links to use new `/to/` links that can be updated as needed.
2024-06-25 18:05:07 +00:00
260102b64c [tool] Provide better CI feedback for combo PRs (#6865)
Currently if a PR follows the recommended combo PR process for a federated plugin, the main PR will have CI errors that say the PR isn't allowed to do what it is doing, which is confusing, especially to new contributors or reviewers.

This updates the tooling to detect the temporary overrides created by the tooling, and uses that to trigger a different error message that explains that the error is expected, and exists only to prevent accidental landing.

Fixes https://github.com/flutter/flutter/issues/129303
2024-06-11 18:57:06 +00:00
3282c23d24 Disable sandboxing for macOS tests in CI (#6866)
macOS 14 added new requirements that un-codesigned sandbox apps must be granted access when changed. Waiting for this UI caused macOS tests to fail on macOS 14. Additionally, adding codesigning is not sufficient, since it must still be approved before codesigning is enough to pass the check. As a workaround, this PR disables sandboxing for macOS tests in CI.

![Screenshot 2024-05-30 at 2 41 33 PM](https://github.com/flutter/flutter/assets/682784/1bc32620-5edb-420a-866c-5cc529b2ac55)

https://developer.apple.com/documentation/updates/security#June-2023)
> App Sandbox now associates your macOS app with its sandbox container using its code signature. The operating system asks the person using your app to grant permission if it tries to access a sandbox container associated with a different app. For more information, see [Accessing files from the macOS App Sandbox](https://developer.apple.com/documentation/security/app_sandbox/accessing_files_from_the_macos_app_sandbox).

And that link explains why this is happening on a macOS 14 update:

> In macOS 14 and later, the operating system uses your app’s code signature to associate it with its sandbox container. If your app tries to access the sandbox container owned by another app, the system asks the person using your app whether to grant access. If the person denies access and your app is already running, then it can’t read or write the files in the other app’s sandbox container. If the person denies access while your app is launching and trying to enter the other app’s sandbox container, your app fails to launch.
> 
> The operating system also tracks the association between an app’s code signing identity and its sandbox container for helper tools, including launch agents. If a person denies permission for a launch agent to enter its sandbox container and the app fails to start, launchd starts the launch agent again and the operating system re-requests access.

Fixes packages part of https://github.com/flutter/flutter/issues/149264.

Verified tests pass:
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac_arm64%20macos_platform_tests%20master%20-%20packages/6/overview
2024-06-06 15:31:23 +00:00
c472e4007c Correcting the typo of Flutter in projects (#6850)
In part of the documentation, Flutter is spelled out with a typo. I fixed it using a repository search.

- [] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]`
2024-06-04 21:10:01 +00:00
5e88f948b8 Clean Xcode project before analyzing and testing (#6842)
On macOS 14, caching seems to be more aggressive with swiftmodules and can cause conflicts between tests. To mitigate this, use `xcodebuild clean` (cleans Derived Data for the project) as part of `xcodebuild analyze` and `xcodebuild test`.

Fixes https://github.com/flutter/flutter/issues/149270. Fixes https://github.com/flutter/flutter/issues/149266.
2024-06-04 15:32:05 +00:00
5cc71d00ac Update Flutter wiki links (#6789)
Updates all links to the Flutter wiki to point to their new location in the flutter/flutter repository. (The sole exception is a link to a doc that doesn't have a final home yet, and is linked from legacy code anyway so doesn't really need to be updated.)

While touching the PR template, makes a few minor improvements:
- Removes the breaking change discussion that doesn't apply to this repository, as breaking changes are handled totally differently for packages (and is covered by the link to docs about Dart versioning).
- Adds text and a link to reflect the fact that some PRs can be changelog-exempt.
2024-05-26 12:47:23 +00:00
65254411e6 [local_auth] Convert native unit tests to Swift (#6779)
Converts native unit tests from Objective-C to Swift, as a first step toward an eventual plugin conversion. Since OCMock usage was removed in a previous PR, the tests are converted essentially directly (the rewrites were largely mechanical syntax replacement), without any changes needed to production code.

There are a few places where interacting with the Pigeon-generated Obj-C is somewhat awkward because the NSError signature isn't auto-converting to `throw` in cases where we use `NSNumber` wrapping, but all that will get cleaned up when we switch the plugin over to Swift Pigeon generation and have idiomatic Swift APIs that the tests will be calling instead.

Fixes a couple of false positives in the repo tooling surfaced by this PR:
- `darwin/Tests/` wasn't recognized as a test directory.
- Swift tests weren't recognized as exempt from requiring Swift entries in the podspec.

Part of https://github.com/flutter/flutter/issues/119104
2024-05-22 14:07:09 +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
62c08f4471 Skip podspec Swift Search Path validation if only swift file is Package.swift for darwin plugins (#6635)
Fix for iOS was added in https://github.com/flutter/packages/pull/6627, but neglected to handle when plugin uses darwin directory.

Supplemental fix for https://github.com/flutter/flutter/issues/147548.
2024-05-02 19:05:00 +00:00
aea93d2a51 Skip podspec Swift Search Path validation if only swift file is Package.swift (#6627)
Usually when an iOS plugin uses Swift files, it requires a workaround in the podspec to add Swift to the search paths. Part of the `podspec-check` command is validating this workaround is found. However, when the only Swift file is the `Package.swift` (Swift Package Manager manifest), skip this validation since having this file does not indicate the plugin uses Swift files.

Fixes https://github.com/flutter/flutter/issues/147548.
2024-04-30 23:43:18 +00:00
1292dc30d8 Add CI steps to test iOS and macOS plugins with both CocoaPods and Swift Package Manager (#6557)
Tests new Swift Package Manager feature added in https://github.com/flutter/flutter/pull/146256.

Fixes https://github.com/flutter/flutter/issues/146901.
2024-04-24 21:29:04 +00:00
bb82cb79b9 [ci] Add more dev dependency checks, and fix errors (#6563)
- Adds `build_runner`, `mockito`, and `pigeon` to the list of dependencies that we expect to only be in dev_dependencies.
- Fixes the error message for violations; I had missed in initial review that the errorr message was the same as the one for non-repo-local depndencies, making it misleading about what the problem was and how to fix it. (Also fixed the indentation, which had always been wrong.)
- Fixes `camera_avfoundation`, which had a violation introduced in my recent PR to start the Pigeon conversion.

See https://github.com/flutter/flutter/issues/117905
2024-04-18 21:43:04 +00:00
663b4754e2 [google_sign_in_ios] Upgrade GoogleSignIn iOS SDK to 7.1 (#6404)
1. Update GoogleSignIn iOS SDK dependency to [7.1](https://github.com/google/GoogleSignIn-iOS/releases/tag/7.1.0), which supports privacy manifests.
1. Update "fetch deps step" to run `pod repo update` every time to avoid missing spec failure. Also added a fetch deps step to the all_packages builds, since those could also use a `pod repo update` but I didn't want to add more logic to those bash scripts.
```
     [!] CocoaPods could not find compatible versions for pod "GoogleSignIn":
       In Podfile:
         google_sign_in_ios (from `Flutter/ephemeral/.symlinks/plugins/google_sign_in_ios/darwin`) was resolved to 0.0.1, which depends on
           GoogleSignIn (~> 7.1)
     None of your spec sources contain a spec satisfying the dependency: `GoogleSignIn (~> 7.1)`.
```
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8752192509749702705/+/u/Run_package_tests/download_Dart_and_iOS_deps/stdout

3. Looks like the new versions of [`GTMSessionFetcher`](https://github.com/CocoaPods/Specs/blob/master/Specs/c/e/3/GTMSessionFetcher/3.3.2/GTMSessionFetcher.podspec.json) and [`AppAuth`](https://github.com/CocoaPods/Specs/blob/master/Specs/b/b/9/AppAuth/1.7.3/AppAuth.podspec.json) don't define modules, so there's an error building it statically:
```
     [!] The following Swift pods cannot yet be integrated as static libraries:
     The Swift pod `GTMAppAuth` depends upon `GTMSessionFetcher` and `AppAuth`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```
I filed https://github.com/google/gtm-session-fetcher/issues/384 and https://github.com/openid/AppAuth-iOS/issues/844.

In the meantime, I updated the example apps to `use_frameworks!`, which would be on for Flutter Swift apps, but not Objective-C ones.  We could add something to the tool to detect this case, and suggest `use_frameworks!` be added?  

4.  Even though google_sign_in_ios does not contain Swift files, for some reason, there is a "pod lib lint" warning complaining `swift_version` isn't set. This seems related to `GTMAppAuth` dependency constraint that went from an Objective-C-only to Swift pod.  So I set `swift_version` since it's harmless.

```
- WARN  | swift: The validator used Swift `4.0` by default because no Swift version was specified. To specify a Swift version during validation, add the `swift_versions` attribute in your podspec. Note that usage of a `.swift-version` file is now deprecated.
```
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8752100979634945505/+/u/Run_package_tests/validate_iOS_and_macOS_podspecs/stdout

## Issues

* Fixes https://github.com/flutter/flutter/issues/145777
* Fixes https://github.com/flutter/flutter/issues/145866
* See also https://github.com/flutter/flutter/issues/137140
2024-04-17 18:03:48 +00:00
18c4ca4bcc [google_maps_flutter] update ios privacy manifest (#6511)
The installation instructions for Google Maps Platform SDKs for iOS now have download links and instructions for **manually** adding Privacy Manifest files for use with the latest versions of the SDKs. You can read more about this [here](https://github.com/googlemaps/google-maps-ios-utils/issues/463#issuecomment-2035734010).

This PR synchronizes the iOS privacy manifest with the file provided by Google for the Maps SDK for iOS. 
The privacy manifest was downloaded from: [https://developers.google.com/maps/documentation/ios-sdk/config#add-apple-privacy-manifest-file](https://developers.google.com/maps/documentation/ios-sdk/config#add-apple-privacy-manifest-file).

As you can see in the new **[PrivacyInfo.xcprivacy](packages/google_maps_flutter/google_maps_flutter_ios/ios/Resources/PrivacyInfo.xcprivacy)** file Google Maps SDK is using the following **NSPrivacyAccessedAPITypes**:

- **NSPrivacyAccessedAPICategoryDiskSpace**
- **NSPrivacyAccessedAPICategorySystemBootTime**
- **NSPrivacyAccessedAPICategoryFileTimestamp**
- **NSPrivacyAccessedAPICategoryUserDefaults**

*Related issues:*
- [flutter/flutter/issues/145269](https://github.com/flutter/flutter/issues/145269)
- [flutter/flutter/issues/143232](https://github.com/flutter/flutter/issues/143232)
- [flutter/flutter/issues/131940](https://github.com/flutter/flutter/issues/131940#issuecomment-2006965339)

Fixes https://github.com/flutter/flutter/issues/94491
2024-04-16 18:55:59 +00:00
e98839a9b8 [tool] Check for test and flutter_test in non-dev dependencies (#6472)
*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

Additional checks as a followup to https://github.com/flutter/packages/pull/6446

*List which issues are fixed by this PR. You must list at least one issue.*

Related to https://github.com/flutter/flutter/issues/145992

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2024-04-10 18:09:17 +00:00
3ff376b7b7 [Tool] Add ability to check dependencies independently of dev-dependencies, exclude integration_test from dependencies (#6446)
Create a linter that ensures that `integration_test` is not used in dependencies. 

Will be paired with a change to documentation 
```
If you are considering adding an external dependency:

Consider other options, and discuss with #hackers-ecosystem in Discord.
* If you add a dev_dependency on an external package, pin it to a specific version if at all possible.
* If you add a dependency on an external package in an example/, pin it to a specific version if at all possible.
* Some dependencies should only be linked as dev dependencies like integration_test 
```

Related to flutter/flutter/issues/145992
2024-04-03 19:44:11 +00:00
924c7e6e89 Reverts "[ci] Temporarily allow-warnings in podspec_check_command.dart (#6416)" (#6419)
Reverts: flutter/packages#6416
Initiated by: ditman
Reason for reverting: Failures happen (later) in other plugins (more updates in the related issue)

https://github.com/flutter/flutter/issues/145866
Original PR Author: ditman

Reviewed By: {jmagman}

This change reverts the following previous change:
Adds `--allow-warnings` to podspec_check_command.dart so stuff can keep rolling.

**To be removed soon!**
2024-03-28 02:55:25 +00:00
e23442506e [ci] Temporarily allow-warnings in podspec_check_command.dart (#6416)
Adds `--allow-warnings` to podspec_check_command.dart so stuff can keep rolling.

**To be removed soon!**
2024-03-28 02:18:23 +00:00
6a4e2ffbc4 [tool] Add features to support GCB auto-publish flow (#6218)
Adds the flowing to the tool:
- A new `--exact-match-only` flag to be used with `--packages` to prevent group matching (i.e., a selection like `--packages=path_provider --exact-match-only` would only run on `packages/path_provider/path_provider`, not `packages/path_provider/*`).
- Two new `publish` command flags:
  - `--tag-for-auto-publish`, to do all the steps that `publish` currently does except for the real `pub publish`, so it would dry-run the publish and then create and push the tag if successful.
  - `--already-tagged`, to skip the step of adding and pushing a tag, and replace it with a check that `HEAD` already has the expected tag.

This set of additions supports a workflow where the current `release` step is changed to use `--tag-for-auto-publish`, and then the separate auto-publish system would publish each package with `... publish --already-tagged --packages=<some package> --exact-match-only`.

See https://github.com/flutter/packages/pull/5005#discussion_r1344542422 for previous discussion/context.

Part of https://github.com/flutter/flutter/issues/126827
2024-03-05 22:34:58 +00:00
0aff69f746 [tool] Ignore GeneratedPluginRegistrant.swift for format (#6195)
This file fails `swift-format lint`, so including it in `format` causes lots of warnings when run locally.
2024-02-26 18:05:23 +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
c56c12dd51 [tool] Add support for using a Kotlin test runner file (#6131) 2024-02-16 02:59:05 +00:00