1953 Commits

Author SHA1 Message Date
Ben Konyi
8cb340cd7a
[ Widget Preview ] Move widget_preview_scaffold tests to dev/integration_tests/widget_preview_scaffold (#180658)
Removes Flutter code from the flutter_tools test suite, which otherwise
only contains non-Flutter code.

Fixes https://github.com/flutter/flutter/issues/180080
2026-01-08 20:25:09 +00:00
Michael Goderbauer
a5b3c4bd69
Run hook_user_defines and link_hook integration tests on CI (#180622)
Fixes https://github.com/flutter/flutter/issues/180575.

As per the
[readme](https://github.com/flutter/flutter/blob/master/dev/integration_tests/README.md#:~:text=Adding%20code%20to%20this%20directory%20will%20not%20automatically%20cause%20it%20to%20be%20run%20by%20any%20already%20existing%20ci%20tooling.),
tests in dev/integration_tests are not automatically run on CI:

> Adding code to this directory will not automatically cause it to be
run by any already existing ci tooling.

This PR fixes the problem by running the `hook_user_defines` and
`link_hook` integration tests as part of the tools integration test
shard.

One of the tests actually broke while it wasn't running on CI. This is
fixed by removing it from the workspace to ensure the local user-defines
in its pubspec are applied.
2026-01-07 16:52:25 +00:00
Justin McCandless
bef11d207f
Some cleanup of cross library test imports (#177029)
There is a lot of cross-library importing in the framework unit tests
that I'd like to clean up, see the design doc for more:
https://docs.google.com/document/d/1UHxALQqCbmgjnM1RNV9xE2pK3IGyx-UktGX1D7hYCjs/edit?tab=t.0

This PR cleans up a few obvious instances and adds TODOs for others. I
created this while doing an investigation for the design doc linked
above. I hope that we'll be able to follow up with fixes for all of the
problematic tests (tracked in the issue below).

Part of https://github.com/flutter/flutter/issues/177028
2026-01-02 19:20:06 +00:00
Justin McCandless
d37058bf2b
Test cross import lint (#178693)
This PR adds a lint rule to catch imports between Material, Cupertino,
and Widgets in tests. Spun out of
https://github.com/flutter/flutter/pull/177029 and the [Decoupling Tests
design
doc](https://docs.google.com/document/d/1UHxALQqCbmgjnM1RNV9xE2pK3IGyx-UktGX1D7hYCjs/edit?pli=1&tab=t.0).

For now, Material will be the place to put tests that need to import
both Material and Cupertino. See
https://github.com/flutter/flutter/pull/178693#discussion_r2550510287.

I used https://github.com/flutter/flutter/pull/130523 as a reference to
create this PR.

---------

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2025-12-30 19:53:30 +00:00
Gray Mackall
91cc68f695
[Reland] Unmodified android sdk bundle (#179920)
Relands https://github.com/flutter/flutter/pull/179647

There were only two failing tests (there were also two bringup failures,
the `mac_arm64_mokey` versions of these)

https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_mokey%20run_release_test/3866/overview

https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_mokey%20run_debug_test_android/5454/overview

They failed with the same logs
```
Task result:
{
  "success": false,
  "reason": "Task failed: flutter run  had unexpected output on standard error."
}
```

The stderr in question:
```
[2025-12-15 14:06:56.311794] [STDOUT] run:stderr: - integration_test requires Android NDK 28.2.13676358
[2025-12-15 14:06:56.311989] [STDOUT] run:stderr: Fix this issue by using the highest Android NDK version (they are backward compatible).
[2025-12-15 14:06:56.312019] [STDOUT] run:stderr: Add the following to /opt/s/w/ir/x/w/rc/tmpr6kj09d_/flutter sdk/dev/integration_tests/ui/android/app/build.gradle:
[2025-12-15 14:06:56.312074] [STDOUT] run:stderr: 
[2025-12-15 14:06:56.312092] [STDOUT] run:stderr:     android {
[2025-12-15 14:06:56.312144] [STDOUT] run:stderr:         ndkVersion = "28.2.13676358"
[2025-12-15 14:06:56.312162] [STDOUT] run:stderr:         ...
[2025-12-15 14:06:56.312205] [STDOUT] run:stderr:     }
```

We can just set the ndk version to `flutter.ndkVersion`, which is this
value. It's also what is set in the templates, so it isn't a hack that
doesn't represent a real flutter app. Verified the tests pass now with
```
../../bin/cache/dart-sdk/bin/dart bin/test_runner.dart test -t run_release_test
../../bin/cache/dart-sdk/bin/dart bin/test_runner.dart test -t run_debug_test_android
```

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
2025-12-16 19:34:38 +00:00
auto-submit[bot]
8edbbb7391
Reverts "Unmodified android sdk bundle (#179647)" (#179904)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#179647
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: gmackall
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Mac_mokey run_release_test failing
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: gmackall
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {reidbaker, jtmcdole}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Changes our cipd hosted android sdk+ndk bundle to no longer modify
directory structure from what Android directly provides, allowing AGP to
find the ndk automatically and preventing downloading.

1. Changes the `create_cipd_packages.sh` script so we don't move the ndk
2. Uses the new script to upload a
[36v4unmodified](https://chrome-infra-packages.appspot.com/p/flutter/android/sdk/all/linux-amd64/+/version:36v4unmodified)
bundle
3. Changes DEPS+ci.yaml to reference the new bundle
4. Changes GN build rules accordingly
5. Removes special config in existing build.gradle files to point at the
location of the ndk - agp should now know where it is without conig
6. For some tests, passes in an environment variable pointing to the ndk
location, to override the environment variable passed by the recipes.
This variable is respected by the tool, so the recipes passing it,
pointing to the wrong place, is problematic. After this change lands we
can stop passing it in the recipes, and then we can remove this special
config in the tests. But adding it temporarily allows us to make this
change without coordinating a recipes change at the same moment, and
probably breaking things out of band.

Logs from a random postsubmit run of `Mac
build_android_host_app_with_module_aar` on the tree currently:

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8695664517253382913/+/u/run_build_android_host_app_with_module_aar/stdout
We see 
> [2025-12-12 10:49:49.223087] [STDOUT] stdout: Checking the license for
package NDK (Side by side) 28.2.13676358 in
/Volumes/Work/s/w/ir/cache/android/sdk/licenses
[2025-12-12 10:49:49.223221] [STDOUT] stdout: License for package NDK
(Side by side) 28.2.13676358 accepted.
[2025-12-12 10:49:49.223268] [STDOUT] stdout: Preparing "Install NDK
(Side by side) 28.2.13676358 v.28.2.13676358".
[2025-12-12 10:50:14.093824] [STDOUT] stdout: "Install NDK (Side by
side) 28.2.13676358 v.28.2.13676358" ready.
[2025-12-12 10:50:14.093909] [STDOUT] stdout: Installing NDK (Side by
side) 28.2.13676358 in
/Volumes/Work/s/w/ir/cache/android/sdk/ndk/28.2.13676358
[2025-12-12 10:50:14.093947] [STDOUT] stdout: "Install NDK (Side by
side) 28.2.13676358 v.28.2.13676358" complete.
[2025-12-12 10:50:14.410724] [STDOUT] stdout: "Install NDK (Side by
side) 28.2.13676358 v.28.2.13676358" finished.

Example of no longer downloading:
Logs from a presubmit run:

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8695732180931529361/+/u/run_build_android_host_app_with_module_aar/stdout

We don't see these logs. We still see android build tools downloading -
we can probably tackle that in another pr.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-12-15 21:55:49 +00:00
Gray Mackall
c0b808c9ed
Unmodified android sdk bundle (#179647)
Changes our cipd hosted android sdk+ndk bundle to no longer modify
directory structure from what Android directly provides, allowing AGP to
find the ndk automatically and preventing downloading.

1. Changes the `create_cipd_packages.sh` script so we don't move the ndk
2. Uses the new script to upload a
[36v4unmodified](https://chrome-infra-packages.appspot.com/p/flutter/android/sdk/all/linux-amd64/+/version:36v4unmodified)
bundle
3. Changes DEPS+ci.yaml to reference the new bundle
4. Changes GN build rules accordingly
5. Removes special config in existing build.gradle files to point at the
location of the ndk - agp should now know where it is without conig
6. For some tests, passes in an environment variable pointing to the ndk
location, to override the environment variable passed by the recipes.
This variable is respected by the tool, so the recipes passing it,
pointing to the wrong place, is problematic. After this change lands we
can stop passing it in the recipes, and then we can remove this special
config in the tests. But adding it temporarily allows us to make this
change without coordinating a recipes change at the same moment, and
probably breaking things out of band.

Logs from a random postsubmit run of `Mac
build_android_host_app_with_module_aar` on the tree currently:

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8695664517253382913/+/u/run_build_android_host_app_with_module_aar/stdout
We see 
> [2025-12-12 10:49:49.223087] [STDOUT] stdout: Checking the license for
package NDK (Side by side) 28.2.13676358 in
/Volumes/Work/s/w/ir/cache/android/sdk/licenses
[2025-12-12 10:49:49.223221] [STDOUT] stdout: License for package NDK
(Side by side) 28.2.13676358 accepted.
[2025-12-12 10:49:49.223268] [STDOUT] stdout: Preparing "Install NDK
(Side by side) 28.2.13676358 v.28.2.13676358".
[2025-12-12 10:50:14.093824] [STDOUT] stdout: "Install NDK (Side by
side) 28.2.13676358 v.28.2.13676358" ready.
[2025-12-12 10:50:14.093909] [STDOUT] stdout: Installing NDK (Side by
side) 28.2.13676358 in
/Volumes/Work/s/w/ir/cache/android/sdk/ndk/28.2.13676358
[2025-12-12 10:50:14.093947] [STDOUT] stdout: "Install NDK (Side by
side) 28.2.13676358 v.28.2.13676358" complete.
[2025-12-12 10:50:14.410724] [STDOUT] stdout: "Install NDK (Side by
side) 28.2.13676358 v.28.2.13676358" finished.

Example of no longer downloading:
Logs from a presubmit run:

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8695732180931529361/+/u/run_build_android_host_app_with_module_aar/stdout

We don't see these logs. We still see android build tools downloading -
we can probably tackle that in another pr.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: DoLT <dolt@guide.inc>
Co-authored-by: Gray Mackall <mackall@google.com>
Co-authored-by: John "codefu" McDole <john@mcdole.org>
2025-12-15 20:18:31 +00:00
auto-submit[bot]
f5b530930a
Reverts "[ Analysis ] Added initial implementation of the flutter_analyzer_plugin (#175679)" (#179766)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#175679
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: jtmcdole
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Linux linux_unopt is now timing out in postsubmit
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: bkonyi
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {srawlins}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
The `flutter_analyzer_plugin` implements rules previously enforced by
the `dev/bots/analyze.dart` check run on the CI, allowing for earlier
detection of custom lint violations before a change is uploaded for
review.

Currently, the plugin implements the following rules:

  - avoid_future_catch_error
  - no_double_clamp
  - no_stopwatches
  - protect_public_state_subtypes
  - render_box_intrinsics

Towards https://github.com/flutter/flutter/issues/175276
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-12-12 00:13:27 +00:00
Ben Konyi
5ec8a97c7d
[ Analysis ] Added initial implementation of the flutter_analyzer_plugin (#175679)
The `flutter_analyzer_plugin` implements rules previously enforced by
the `dev/bots/analyze.dart` check run on the CI, allowing for earlier
detection of custom lint violations before a change is uploaded for
review.

Currently, the plugin implements the following rules:

  - avoid_future_catch_error
  - no_double_clamp
  - no_stopwatches
  - protect_public_state_subtypes
  - render_box_intrinsics

Towards https://github.com/flutter/flutter/issues/175276
2025-12-11 18:19:37 +00:00
Ben Konyi
430800f8c0
[ Infra ] Shard Windows tool_tests_commands (#179409)
Should fix https://github.com/flutter/flutter/issues/177708
2025-12-04 00:36:54 +00:00
Kate Lovett
9d96df2364
Modernize framework lints (#179089)
WIP

Commits separated as follows:
- Update lints in analysis_options files
- Run `dart fix --apply`
- Clean up leftover analysis issues 
- Run `dart format .` in the right places.

Local analysis and testing passes. Checking CI now.

Part of https://github.com/flutter/flutter/issues/178827
- Adoption of flutter_lints in examples/api coming in a separate change
(cc @loic-sharma)

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-11-26 01:10:39 +00:00
Kate Lovett
460d55e659
Bump Dart to 3.9 (#179041)
Prep for https://github.com/flutter/flutter/issues/178827

This bumps Dart to 3.9.

We are holding off on 3.10 until we can include best practices for dot
shorthands in the style guide, which will follow the lint update in
#178827

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-11-25 00:41:40 +00:00
Mouad Debbar
ea23b986ae
[web] Skip flaky service worker test (#178820)
Fixes https://github.com/flutter/flutter/issues/178032
2025-11-19 22:04:57 +00:00
Mouad Debbar
ce7d9b9882
[web] Reduce Skwasm test shards to 2 (#178239)
Part of https://github.com/flutter/flutter/issues/174961
2025-11-17 15:28:52 +00:00
Jason Simmons
36f0ee7741
Validate that platforms specified in .ci.yaml target names match the platforms defined in the platform_properties section (#177523)
Target names must begin with a platform name. The LUCI configuration
scripts in https://flutter.googlesource.com/infra will look up the
platform name in platform_properties to obtain the dimensions for the
bot where the target will be scheduled.

See https://github.com/flutter/flutter/issues/177465
2025-11-04 18:25:18 +00:00
Pierre
f234d26926
Clean up links to docs website (#177792)
- remove link without use (PowerShell version minimum not reached, this
is not mentionned anywhere in Windows installation / troubleshooting
documentation)
- clean up API docs root
- clean up app template links, add `Learn Flutter` link
- update get started links
- replace `flutter.dev/docs` with `docs.flutter.dev`
- fix embedder descriptions
- fix broken API `docs.flutter.io` links
- http → https 
- remove `/install` from `/get-started` links
- fix Android Studio link

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Parker Lougheed <parlough@gmail.com>
2025-11-01 18:38:27 +00:00
Jason Simmons
f25a04f256
Roll dartdoc to 9.0.0 (#177590)
Required for compatibility with the latest Dart SDK and analyzer package
2025-10-27 17:28:12 +00:00
Mouad Debbar
f94a942186
[web] Self-cleaning service worker (#176834)
Introduce a self-cleaning service worker to replace the old one.

Previous attempts (https://github.com/flutter/flutter/pull/170918,
https://github.com/flutter/flutter/pull/173609) had (accidentally?)
disabled the loading of the service worker in `flutter.js`. This PR
preserves the logic for loading the service worker, and it prints a
deprecation warning.

Towards https://github.com/flutter/flutter/issues/156910
Closes https://github.com/flutter/flutter/issues/106225
2025-10-17 21:18:29 +00:00
Ben Konyi
37848d12a8
Roll package:analyzer forward to 8.1.1 (#173867) 2025-08-15 22:56:22 +00:00
gaaclarke
bd542bb687
licenses_cpp: reland switch 4 (#173139)
Let's give this one more go, otherwise we'll have to switch to
downloading a prebuilt binary.

## whats new since revert

I've added `is_minimal_linux` flag which removes targets that can't be
processed by GN on the autoroller image. The linux bot has been changed
to use that flag too.

## testing

I got access to the docker image of the autoroller bots and manually
tested that this works.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-08-04 17:37:29 +00:00
auto-submit[bot]
a1dda4fe8b
Reverts "Reland licenses cpp switch 3 (#173063)" (#173113)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#173063
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: gaaclarke
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Again failing out because pkg-config is not
present on the host machine.
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: gaaclarke
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {jtmcdole, jason-simmons}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
reland of https://github.com/flutter/flutter/pull/173059

Unfortunately we don't have the ability to test the changes on the
autoroller bots beforehand, so we have to resort to landing new
attempts.

## changes since last revert
- Removed usage of `et`. That was doing a `gn desc` call which forced GN
to look for x11 for glfw which relies on `pkg-config` which doesn't
exist on those machines.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-08-01 15:49:26 +00:00
gaaclarke
909c69811d
Reland licenses cpp switch 3 (#173063)
reland of https://github.com/flutter/flutter/pull/173059

Unfortunately we don't have the ability to test the changes on the
autoroller bots beforehand, so we have to resort to landing new
attempts.

## changes since last revert
- Removed usage of `et`. That was doing a `gn desc` call which forced GN
to look for x11 for glfw which relies on `pkg-config` which doesn't
exist on those machines.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-07-31 21:41:52 +00:00
auto-submit[bot]
016143afde
Reverts "Reland licenses cpp switch 2 (#172996)" (#173059)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#172996
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: gaaclarke
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: autoroller script failure, no pkg-config

```
Failed to transition from "idle" to "active": failed pre-upload step: Command exited with exit status 127: /data/flutter/.autoroller-preupload.sh; Stdout+Stderr:
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code.
    pkgresult = exec_script(pkg_config_script, args, "value")
                ^----------
Curren
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: gaaclarke
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {jason-simmons}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Differences since last land:
1) `gn gen` is now called in the script (see https://github.com/flutter/flutter/pull/172904)
1) The licenses are now simpatico with google's lint (https://github.com/flutter/flutter/pull/172991)

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description above.
- [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] I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
- [x] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

<!-- Links -->
[Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-07-31 18:07:48 +00:00
gaaclarke
2a391acbc8
Reland licenses cpp switch 2 (#172996)
Differences since last land:
1) `gn gen` is now called in the script (see
https://github.com/flutter/flutter/pull/172904)
1) The licenses are now simpatico with google's lint
(https://github.com/flutter/flutter/pull/172991)

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-07-31 16:42:13 +00:00
Ricardo Dalarme
56d5389456
Migrate to null aware elements - Part 5 (#172418)
## Description

Continuing the work from @jamilsaadeh97 to replace verbose null checks
with modern
[null_aware_elements](https://dart.dev/tools/linter-rules/use_null_aware_elements)
syntax.

This PR cleans up the remaining files not covered in the previous parts,
making the code more concise.

## Related PRs

- https://github.com/flutter/flutter/pull/172198
- https://github.com/flutter/flutter/pull/172306
- https://github.com/flutter/flutter/pull/172307
- https://github.com/flutter/flutter/pull/172322

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-07-30 18:40:09 +00:00
Siva
5143f4333c
Reland - Manual roll of Dart from 5ede85aff798 to 14ea8d342149 (#172947)
https://dart.googlesource.com/sdk.git/+log/5ede85aff798..14ea8d342149

https://dart.googlesource.com/sdk.git/+/refs/tags/3.10.0-36.0.dev
https://dart.googlesource.com/sdk.git/+/refs/tags/3.10.0-35.0.dev
https://dart.googlesource.com/sdk.git/+/refs/tags/3.10.0-34.0.dev
https://dart.googlesource.com/sdk.git/+/refs/tags/3.10.0-33.0.dev
https://dart.googlesource.com/sdk.git/+/refs/tags/3.10.0-32.0.dev
https://dart.googlesource.com/sdk.git/+/refs/tags/3.10.0-31.0.dev
https://dart.googlesource.com/sdk.git/+/refs/tags/3.10.0-30.0.dev
https://dart.googlesource.com/sdk.git/+/refs/tags/3.10.0-29.0.dev
2025-07-30 16:37:17 +00:00
Gray Mackall
5f9b9ab498
Refactor Android platform view code in advance of enabling HCPP on existing PV widgets (behind a flag) (#170553)
Should introduce no behavior changes. Refactors the android platform
view code so that
1. The delegator is ready to delegate between PlatformViewsController
(PVC) 1 and 2, and implements a
`PlatformViewsChannel.PlatformViewsHandler`.
2. The `PlatformViewCreationRequest` and `PlatformViewTouch` are fully
shared between the two platform view modes
3. Introduces new factory constructors for the different types of
`PlatformViewCreationRequest`s, corresponding to the modes.

Making the flag work on existing widgets will be done in a follow up PR
here
67262d9240/engine/src/flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java (L95).


## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
Co-authored-by: Reid Baker <1063596+reidbaker@users.noreply.github.com>
2025-07-29 20:49:12 +00:00
auto-submit[bot]
b5b5897342
Reverts "Reland licenses cpp switch (#172671)" (#172912)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#172671
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: gaaclarke
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: integration problems with google roller
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: gaaclarke
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {matanlurey, jtmcdole}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
changes since last land:
1) Now the license checker can trim matched licenses to remove regions
that aren't apropos
1) There is a `.autoroller-preupload.sh` script that should update the
LICENSE file when the autoroller executes

relies on:
- https://github.com/flutter/flutter/pull/172655
- https://skia-review.googlesource.com/c/buildbot/+/1025936

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-07-29 18:25:26 +00:00
gaaclarke
7063ea19c4
Reland licenses cpp switch (#172671)
changes since last land:
1) Now the license checker can trim matched licenses to remove regions
that aren't apropos
1) There is a `.autoroller-preupload.sh` script that should update the
LICENSE file when the autoroller executes

relies on:
- https://github.com/flutter/flutter/pull/172655
- https://skia-review.googlesource.com/c/buildbot/+/1025936

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-07-28 21:07:33 +00:00
Matan Lurey
35ebc20b99
Update main/master repoExceptions analysis set (#172796)
Some of the repos are no longer referenced, others have migrated.
2025-07-25 22:48:15 +00:00
Matan Lurey
476d998c56
Refactor verifyVersion into typed Version object, use it (#172780)
Towards https://github.com/flutter/flutter/issues/171900.
2025-07-25 19:25:54 +00:00
Gray Mackall
3e6777a43d
[Android] Add missing ci configuration for Linux android_java17_tool_integration_tests (#172702)
Fixes the configuration needed to run the shard. I forgot this in
https://github.com/flutter/flutter/pull/172581, as I had a
misunderstanding about how this would get run.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Gray Mackall <mackall@google.com>
2025-07-24 20:30:49 +00:00
Matan Lurey
0a2ee25955
Update dev/bots/post_process_docs.dart to use flutter.version.json (#172601)
Towards https://github.com/flutter/flutter/issues/171900.

The "legacy" (`//version`) file has been "legacy" for years. This PR
allows deprecating and removing it in the near future.

Example of `//bin/cache/flutter.version.json`:
```json
{
  "frameworkVersion": "3.33.0-1.0.pre-1070",
  "channel": "master",
  "repositoryUrl": "unknown source",
  "frameworkRevision": "be9526fbaaaab9474e95d196b70c41297eeda2d0",
  "frameworkCommitDate": "2025-07-22 11:34:11 -0700",
  "engineRevision": "be9526fbaaaab9474e95d196b70c41297eeda2d0",
  "engineCommitDate": "2025-07-22 18:34:11.000Z",
  "engineContentHash": "70fb28dde094789120421d4e807a9c37a0131296",
  "engineBuildDate": "2025-07-22 11:47:42.829",
  "dartSdkVersion": "3.10.0 (build 3.10.0-15.0.dev)",
  "devToolsVersion": "2.48.0",
  "flutterVersion": "3.33.0-1.0.pre-1070"
}
```

Example of `//version`:
```txt
3.33.0-1.0.pre-1070
```
2025-07-23 14:46:09 +00:00
John "codefu" McDole
ff983d3598
feat: start using the content aware hash for downloading artifacts (#172552)
reland of https://github.com/flutter/flutter/pull/171927
towards https://github.com/flutter/flutter/issues/171790

Use the content aware hash when downloading engine artifacts. These are
currently produced when changes to DEPs, engine/, or the release file
are changed in a not-seen-before way.

We can eventually remove engine.version being tracked in release
branches as an optimization.

FLUTTER_PREBUILT_ENGINE_VERSION will stay for overriding the
engine.version for testing. Though Cocoon does not need to actually set
it for framework only PRs anymore.

fxies post submit tests for content_hash download:
SHARD=framework_tests SUBSHARD=misc dart --enable-asserts
dev/bots/test.dart
SHARD=tool_host_cross_arch_tests dart --enable-asserts
dev/bots/test.dart

```
  ╔═╡ERROR https://github.com/flutter/flutter/pull/1╞════════════════════════════════════════════════════════════════════
  ║ Expected "Flutter Engine Version: 45b085ab2118f30441ae6e2daab4b8eb3e4a063c", but found "Flutter Engine Version: 407c051ec9".
  ╚═══════════════════════════════════════════════════════════════════════════════
```

```
  Expected: contains '45b085ab2118f30441ae6e2daab4b8eb3e4a063c'
     Which: does not contain '45b085ab2118f30441ae6e2daab4b8eb3e4a063c'
```
2025-07-22 17:35:26 +00:00
Ben Konyi
ec9e07d9b9
[ Tool ] Fix flutter upgrade stating that an upgrade is available on main when up to date (#172141)
The `frameworkVersion` string written to the version files wasn't
actually parsable by `GitTagVersion` as it didn't match the format
output by `git`.

This change updates the `frameworkVersion` format to use a `-` instead
of a `.` before the commit count and adds support to the version parsing
regex to handle both `.` and `-` separators before the commit count.

Fixes https://github.com/flutter/flutter/issues/172091
2025-07-15 01:00:38 +00:00
Mouad Debbar
43b0bf379e
[web] Cleanup unnecessary dart defines and renderer in web tests (#172130) 2025-07-14 20:23:25 +00:00
John "codefu" McDole
343331564d
fix: documentation around led launch broken (#171983)
When we removed is_fusion, this document was left with a dangling "led
edit -pa". Removed.
2025-07-14 18:16:04 +00:00
Ben Konyi
1709c884aa
[ Tool ] Enable omit_obvious_*_types and specify_nonobvious_*_types lints (#172018)
Sources under `packages/flutter_tools/` aren't accessible to the average
Flutter user by navigating through sources from their projects, so it
doesn't need to be as explicitly verbose with types for readability
purposes. The `always_specify_types` lint results in extremely verbose
code within the tool which adds little value.

This change disables `always_specify_types` in favor of a new set of
lints that aim to reduce verbosity by removing obvious types while also
maintaining readability in cases where variable types otherwise wouldn't
be obvious:

  - `omit_obvious_local_variable_types`
  - `omit_obvious_property_types`
  - `specify_nonobvious_local_variable_types`
  - `specify_nonobvious_property_types`
2025-07-11 19:32:57 +00:00
Mouad Debbar
8236b84e3a
[web] Disable auto-formatting for the stack_trace.dart test file (#171801)
Fixes https://github.com/flutter/flutter/issues/171725
2025-07-08 20:08:13 +00:00
Reid Baker
7762b4cf32
Bump warn and error versions of agp, kotlin and gradle versions in preparation for gradle 9 (#171776)
- **Relands "Bump warn and error versions of agp, kotlin and gradle
versions in preparation for gradle 9 (#171399)"**
- **bump lockfile generator to use kotlin 2.1.0**
- **Update formatting of lockfile to pass ktlint** 

Updated lockfiles with
`JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/
dart dev/tools/bin/generate_gradle_lockfiles.dart` after
dev/tools/bin/generate_gradle_lockfiles.dart to bump the versions of
kotlin.

Failing tests from first attempt
https://flutter-dashboard.appspot.com/#/build?hashFilter=84a5ce765d193a9c79ab4297f367d5ad7efc5dac&showMac=false&showWindows=false&showiOS=false&showLinux=false&showBringup=true&repo=flutter&branch=master

Verified example test that cause revert was passing by running the
following

- `../../bin/cache/dart-sdk/bin/dart bin/test_runner.dart test -t
run_debug_test_android.dart` from `dev/devicelab`
- `../../bin/cache/dart-sdk/bin/dart bin/test_runner.dart test -t
run_release_test` from `dev/devicelab`
- `SHARD=android_engine_vulkan_tests bin/cache/dart-sdk/bin/dart
dev/bots/test.dart` from root with an android emulator. Hard to actually
verify because the emulator is closed as part of the tests but no
failures were from failures to compile.
- `flutter test
test/general.shard/android/android_project_migration_test.dart` from
`packages/flutter_tools/`

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-07-08 18:40:35 +00:00
auto-submit[bot]
9b0f94aef6
Reverts "Bump warn and error versions of agp, kotlin and gradle versions in preparation for gradle 9 (#171399)" (#171736)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#171399
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Many Gradle/Android related tasks are failing
([one
example](https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_mokey%20run_release_test/1347/overview))
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: reidbaker
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {gmackall}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
https://gradle.org/whats-new/gradle-9/ is coming and with it includes
some deprecated methods. Some like
https://github.com/flutter/flutter/pull/171397 can be fixed by
annotations and calling new methods. Some like the deprecation of
minsdkversion on Variant require bumping the minimum versions to be able
to compile code that will work.

b/368604254

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.


<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-07-07 23:22:47 +00:00
Reid Baker
84a5ce765d
Bump warn and error versions of agp, kotlin and gradle versions in preparation for gradle 9 (#171399)
https://gradle.org/whats-new/gradle-9/ is coming and with it includes
some deprecated methods. Some like
https://github.com/flutter/flutter/pull/171397 can be fixed by
annotations and calling new methods. Some like the deprecation of
minsdkversion on Variant require bumping the minimum versions to be able
to compile code that will work.

b/368604254

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
2025-07-07 22:11:15 +00:00
Kate Lovett
a04fb324be
Bump Dart to 3.8 and reformat (#171703)
Bumps the Dart version to 3.8 across the repo (excluding
engine/src/flutter/third_party) and applies formatting updates from Dart
3.8.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] 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] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [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/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-07-07 17:58:32 +00:00
Ben Konyi
5959600e16
[ Widget Previews ] Support projects containing libraries with part files (#171027)
Reworked the dependency model to be library based instead of script
based in order to support libraries spanning multiple scripts.

Also refactored test logic to improve maintainability and simply writing
tests against the `PreviewDetector`.
2025-06-25 16:00:10 +00:00
Nicholas Shahan
8c104eb053
Remove temporary workaround for web testing (#170949)
Running applications with `-d web-server --web-experimental-hot-reload`
was fixed in https://github.com/flutter/flutter/commit/b757dab. These
tests can now run with the hot reload support enabled.
2025-06-24 16:19:40 +00:00
Matan Lurey
40766c2752
Move packages_autoroller out of the carcass of conductor, delete conductor (#171029)
Towards https://github.com/flutter/flutter/issues/169780.

Sorted the workspace paths while I was at it.
2025-06-24 00:03:41 +00:00
Jackson Gardner
6b17f99216
Make service worker tests more lenient. (#170939)
Some of these request paths are not guaranteed to be requested by the
time the test is finished, which makes this test somewhat flaky. We
don't really care about verifying these requests specifically anyway, so
just don't track them or compare them to our expectations.

This fixes https://github.com/flutter/flutter/issues/171025
2025-06-23 20:28:24 +00:00
Matan Lurey
d77e14ce4f
Engine builders no longer require is_fusion (#170849)
Yay, we're de-fused!

/cc @LouiseHsu
2025-06-18 23:59:09 +00:00
Matan Lurey
e496ad5ea7
Remove and inline license_header.txt (#170475)
Towards https://github.com/flutter/flutter/issues/169780.
2025-06-17 18:06:55 +00:00
Jackson Gardner
dbb105a74d
Reland lazy path and object arenas (#170303)
This PR is an attempt to reland
https://github.com/flutter/flutter/pull/168996

There were some issues that cropped up in the `web_long_running_test`
shards. However, it turns out that these tests don't actually run in
presubmit on any PR that has any engine changes, which is not ideal. I
modified the long running tests to run in presubmit, but this had issues
because apparently a big chunk of these integration tests actually are
trying to download canvaskit from CDN. I changed almost all of the tests
to use local canvaskit (which should make them more reliable and
hermetic). There is one test whose job is to actually test the CDN
itself, and I am leaving that disabled in presubmit for PRs that have
engine changes (since the engine artifacts won't be uploaded to CDN yet)
but the rest of them are all running and passing now.

Also, I fixed the underlying issue that was exposed by the long running
tests, which is that the CanvasKit path clipping stuff in the layer
visitor needs to be aware of LazyPath.
2025-06-16 18:31:10 +00:00