5892 Commits

Author SHA1 Message Date
Elijah Okoroh
fdc1b5cd29
Adapt xcresult parser for Xcode 16 changes (#172596)
This PR updates the iOS build process to support breaking changes in
Xcode 16's xcresulttool. The xcresulttool get command, which Flutter
uses to parse native build issues, is deprecated and replaced by the new
xcresulttool get build-results command. This new command also introduces
a completely new, flatter JSON output format.

To address this while maintaining backwards compatibility, this change
introduces a two-part solution:
- The XCResultGenerator now detects the Xcode version and conditionally
calls the appropriate command (get build-results for Xcode 16+ and get
for older versions).
- The XCResult parser has been refactored to be "bilingual," meaning it
can intelligently detect the JSON structure and parse both the old
(nested) and new (flat) formats correctly.
- This ensures that native iOS build errors and warnings continue to be
correctly parsed and displayed to the user on all supported Xcode
versions.

Fixes #151502 

## 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-23 23:14:52 +00:00
Matan Lurey
1e84cbef10
Emit a warning on --[no-]disable-dds, preferring --no-dds (#172595)
Towards https://github.com/flutter/flutter/issues/150279.

I'll CP this into 3.35, and then we can remove support for the flag on
`master`.

(IIRC this only still existed because of google3)
2025-07-23 14:36:35 +00:00
Matan Lurey
fb80c976c5
Prefix generated Dart plugin imports for registerWith (#172511)
Closes https://github.com/flutter/flutter/issues/100421.
2025-07-23 00:11:21 +00:00
Matan Lurey
7f92ee28ef
Remove stale references to .packages in tool tests (#172582)
Closes https://github.com/flutter/flutter/issues/106210.
2025-07-23 00:09:00 +00:00
Matan Lurey
6fd30fd25a
Wraps all git executions in a Git(...).*, use *=noglob on Windows (#172495)
Closes https://github.com/flutter/flutter/issues/74165.

The original issue called for, on Windows, telling `CYGWIN` to use
`=noglob`, to work around some git operation errors that happen when
using non-native Git. There ... was no great way to do this with the
existing codebase without, IMO, adding lots of confusing code.

So, I refactored all the calls of:
- before: `processUtils.<method>(['git', ...args], ...params)` 
- after: `git.<method>([...args], ...params)`

... and implicitly add the new environment variables, if
`Platform.isWindows`.

Did some minor test cleanup and process execution cleanup while I was at
it.
2025-07-23 00:03:32 +00:00
Matan Lurey
6d62770d08
Omit instruction to cd . after flutter create (#172513)
Closes https://github.com/flutter/flutter/issues/100588.
2025-07-22 22:45:14 +00:00
Matan Lurey
3038239932
Use a fake representation of cache/artifacts/gradle_wrapper (#172503)
... so that it doesn't require downloading cache artifacts to run
`general.shard/project_test.dart`.

Closes https://github.com/flutter/flutter/issues/83275.
2025-07-22 21:13:03 +00:00
Michael Goderbauer
6b7d92852c
Bump meta to 0.17.0 (#172541)
Unclear why the bot didn't bump this.
2025-07-22 17:51:20 +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
Matan Lurey
d16e5b9971
Hide flutter assemble unless --verbose (#172508)
Towards https://github.com/flutter/flutter/issues/97505.
2025-07-22 05:34:22 +00:00
Matan Lurey
852760424a
Wrap ShutdownHook calls to avoid crashing the tool (#171917)
Closes https://github.com/flutter/flutter/issues/57351.
2025-07-21 18:41:08 +00:00
Matan Lurey
80f4a0f251
Add support for /? to alias to --help (#172328)
Closes https://github.com/flutter/flutter/issues/70616.
2025-07-21 17:20:08 +00:00
Matan Lurey
8667c183af
Adds (defaults to ___) when using flutter config --help (#172329)
Closes https://github.com/flutter/flutter/issues/81665.
2025-07-21 17:09:17 +00:00
Matan Lurey
5ed913b2db
Add a warning on usage of dartPluginClass: 'none'. (#172315)
Towards https://github.com/flutter/flutter/issues/57497.

Supersedes https://github.com/flutter/flutter/pull/171922 based on
@stuartmorgan-g's advice for a warning release.

I'll CP this into `3.35` (beta) so that we can clean it up on `master`
anytime.
2025-07-21 17:08:51 +00:00
Matan Lurey
599ed5252e
Skip [tool] crash reporting on --local-engine (#172326)
Closes https://github.com/flutter/flutter/issues/70238.
2025-07-21 17:08:51 +00:00
Matan Lurey
1c1f234b87
Remove IDE validation from flutter doctor (#171924)
Closes https://github.com/flutter/flutter/issues/61246.

I open to doing this behind a flag, but given we decided already 5 years
ago to do this, I'm leaning limiting this to an announcement
(`flutter-announce@`) and just landing this cleanup.

Open to suggestions.
2025-07-21 17:08:50 +00:00
Matan Lurey
032b0f00b5
Refactor and forbid base/exit.dart outside of lib/runner.dart (#171923)
Closes https://github.com/flutter/flutter/issues/59338.
2025-07-17 23:16:25 +00:00
flutter-pub-roller-bot
151eeb0e38
Roll pub packages (#172193)
This PR was generated by `flutter update-packages --force-upgrade`.
2025-07-16 01:05:07 +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
Loïc Sharma
6474b04e6d
Reland "Add feature flags to the framework" (#171545)
This relands https://github.com/flutter/flutter/pull/168437. The google3
fixes were landed in: https://github.com/flutter/flutter/pull/171547,
https://critique.corp.google.com/cl/781275353,
https://github.com/flutter/flutter/pull/171933.

This PR is split into two commits:

1. d6253794e8982348c5c21cb63e8f6bf785664be6, code from
https://github.com/flutter/flutter/pull/168437 without any changes
2. f35d29e4af630d2d4fdb0cda8686b6ff9f77227a, updates the PR to omit
obvious types.

Original PR description:

## Motivation

We'd like to let users opt-in to experimental features so that they can
give early feedback while we iterate on the feature. For example:

Example feature flags:

1. Android sensitive content:
https://github.com/flutter/flutter/pull/158473. When enabled, Flutter
will tell Android when the view contains sensitive content like a
password.
3. Desktop multi-window. When enabled, Flutter will use child windows to
allow things like a context menu to "escape" outside of the current
window.

### Use case

Users will be able to turn on features by:

* **Option 1**: Run `flutter config --enable-my-feature`. This enables
the feature for all projects on the machine
* **Option 2**: Add `enable-my-feature: true` in their `pubspec.yaml`,
under the `flutter` section. This would enable the for a single project
on the machine.

Turning on a feature affects _both_ development-time (`flutter run`) and
deployment-time (`flutter build x`). For example, I can `flutter build
windows` to create an `.exe` with multi-window features enabled.

## How this works

This adds a new
[`runtimeId`](https://github.com/flutter/flutter/pull/168437/files#diff-0ded384225f19a4c34d43c7c11f7cb084ff3db947cfa82d8d52fc94c112bb2a7R243-R247)
property to the tool's `Feature` class. If a feature is on and has a
`runtimeId`, its `runtimeId` will be [stamped into the Dart application
as a Dart
define](https://github.com/flutter/flutter/pull/168437/files#diff-bd662448bdc2e6f50e47cd3b20b22b41a828561bce65cb4d54ea4f5011cc604eR293-R327).
The framework uses this Dart define to [determine which features are
enabled](https://github.com/flutter/flutter/pull/168437/files#diff-c8dbd5cd3103bc5be53c4ac5be8bdb9bf73e10cd5d8e4ac34e737fd1f8602d45).

### Multi-window example

https://github.com/flutter/flutter/pull/168697 shows how this new
feature flag system can be used to add a multi-window feature flag:

1. It adds a new [multi-window
feature](https://github.com/flutter/flutter/pull/168697/files#diff-0ded384225f19a4c34d43c7c11f7cb084ff3db947cfa82d8d52fc94c112bb2a7R189-R198)
to the Flutter tool. This can be turned on using `flutter config
--enable-multi-window` or by putting `enable-multi-window: true` in an
app's .pubspec, under the `flutter` section.
2. It adds a new
[`isMultiWindowEnabled`](https://github.com/flutter/flutter/pull/168697/files#diff-c8dbd5cd3103bc5be53c4ac5be8bdb9bf73e10cd5d8e4ac34e737fd1f8602d45R7-R11)
property to the framework.
4. The Material library can use this new property to determine whether
it should create a new window.
[Example](https://github.com/flutter/flutter/pull/168697/files#diff-2cbc1634ed6b61d61dfa090e7bfbbb7c60b74c8abc3a28df6f79eee691fd1b73).

## Limitations

### Tool and framework only

For now, these feature flags are available only to the Flutter tool and
Flutter framework. The flags are not automatically available to the
embedder or the engine.

For example, embedders need to configure their surfaces differently if
Impeller is enabled. This configuration must happen before the Dart
isolate is launched. As a result, the framework's feature flags is not a
viable solution for this scenario for now. For these kinds of scenarios,
we should continue to use platform-specific configuration like the
`AndroidManifest.xml` or `Info.plist` files.

This is a fixable limitation, we just need to invest in this plumbing :)

### Tree shaking

Feature flags are not designed to help tree shaking. For example, you
cannot conditionally import Dart code depending on the enabled feature
flags. Code that is feature flagged off will still be imported into
user's apps.
2025-07-15 00:02:16 +00:00
Ben Konyi
b40f19b7ed
[ Widget Preview ] Initial work to support reacting to IDE events (#172040)
Adds support for a subset of the DTD `Editor` service registered by IDEs
for use by the widget preview scaffold. Currently, this feature subset
includes support for listening for:

 - Source file selection events
 - Editor theme change events

This change does not introduce any new functionality that makes use of
these new DTD `Editor` events.
2025-07-14 19:35:59 +00:00
Mouad Debbar
a930ec1a6c
Run hot_restart_web_ddc_library_bundle_test.dart on Mac/Windows (#171282)
Part of https://github.com/flutter/flutter/issues/171276
2025-07-14 14:30:24 +00:00
Loïc Sharma
5154d16d1f
[tool] Make google3 have to override feature flags (#171933)
_⚠️ Landing this is blocked until: 1)
https://critique.corp.google.com/cl/781275353 lands and 2) google3 is
updated to add the new feature flag introduced in
https://github.com/flutter/flutter/pull/171903._

Currently, google3's `Google3Features` extends `FeatureFlags`. As a
result, google3 automatically gets the same feature flag values as in
Flutter.

This makes Flutter's feature flag values abstract, thereby requiring
that google3's `Google3Features` must explicitly set each feature flag's
value.

Discussion that motivated this change:
https://github.com/flutter/flutter/pull/171797
Internal CL: https://critique.corp.google.com/cl/781275353
Part of: https://github.com/flutter/flutter/issues/167668

## 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-11 20:42:08 +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
255e8c20a0
Run hot_reload_with_asset_web_test.dart on Mac/Windows (#171280)
Part of https://github.com/flutter/flutter/issues/171276
2025-07-11 15:09:07 +00:00
Mouad Debbar
cbe78368ee
Run stateless_stateful_hot_reload_web_test.dart on Mac/Windows (#171283)
Part of https://github.com/flutter/flutter/issues/171276
2025-07-10 15:38:33 +00:00
Matan Lurey
89ed67d7b0
Add flutter config --enable-omit-legacy-version-file (#171903)
Towards https://github.com/flutter/flutter/issues/171900.

We can decide how quickly to move here, but a feature flag will make it
easier to try out/rollback.
2025-07-09 21:30:01 +00:00
Danny Valente
953b6e4a28
Allow flutter attach to discover flutter engine running on Custom Device (#170635)
## Summary

A Custom Device's log reader doesn't do anything, and thus `flutter
attach` will fail to ever find the flutter engine's VM service.

This change adds a new `readLogs` command to the CustomDeviceConfig, and
which allows a custom device to read the logs from the running flutter
app on the actual custom device, and then allow flutter attach to work.

Fixes #170634

## Testing

Created a custom device, and added the following readLogs command in the
`custom_devices.json` file:
```
"readLogs": [
        "sshpass",
        "-f",
        "/home/dvalente/player.txt",
        "ssh",
        "root@10.0.0.20",
        "tail -Fn +1 /opt/log/flutter.log"
      ]
```

Then, running `flutter attach` works every time.

**Tested the following scenarios:**
* Launched `flutter attach` before app is running on device, and once
app runs, flutter attach succeeds
* Launched `flutter attach` after app is already running on device, and
flutter attach succeeds.
* Used `flutter attach` in Android Studio, and hot reload works just
like any Android device.
2025-07-09 21:28:49 +00:00
Matan Lurey
4abe4d35f5
Hide the rarely direct used --sample argument by default (#171898)
Closes https://github.com/flutter/flutter/issues/51859.
2025-07-09 21:28:49 +00:00
Matan Lurey
f13c1d0dad
Support NO_COLOR to opt-out of flutter tool ANSI colors (#171892)
Closes https://github.com/flutter/flutter/issues/49444.
2025-07-09 21:28:49 +00:00
Nate Biggs
06ce4bb187
Add analytics events for wasm dry runs on web builds (#171818)
Follow up to https://github.com/flutter/flutter/pull/171682
Depends on https://github.com/dart-lang/tools/pull/2125

---------

Co-authored-by: Nate Biggs <natebiggs@google.com>
2025-07-09 21:25:52 +00:00
Matan Lurey
e212d3dcd8
Add total execution time to the flutter upgrade command (#171475)
Closes https://github.com/flutter/flutter/issues/47090.
2025-07-09 21:23:49 +00:00
Nate Biggs
b5b3636106
Add support for running dart2wasm in dry run mode on js compilations (#171682)
Example message with findings:

```

Wasm dry run findings:
Found incompatibilities with WebAssembly.

package:counter1/main.dart 3:1 - dart:html unsupported (0)


Consider addressing these issues to enable wasm builds. See docs for more info: https://docs.flutter.dev/platform-integration/web/wasm


Compiling lib/main.dart for the Web...                             10.9s
✓ Built build/web
```

Example message without findings:

```

Wasm dry run succeeded. Consider building and testing your application with the `--wasm` flag. See docs for more info: https://docs.flutter.dev/platform-integration/web/wasm

Compiling lib/main.dart for the Web...                             10.8s
✓ Built build/web
```

---------

Co-authored-by: Nate Biggs <natebiggs@google.com>
2025-07-08 21:39:50 +00:00
Matan Lurey
968b657788
Remove now duplicate un-forward ports for Android (#171473)
Closes https://github.com/flutter/flutter/issues/46114.

Cleans up the `attach_test` suite a bit to be more reflective of the
real code.
2025-07-08 21:00:01 +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
Matan Lurey
8449573549
Add/use addMachineOutputFlag/outputsMachineFormat instead of strings (#171459)
Prepares to make changes such as
https://github.com/flutter/flutter/issues/10621 easier.
2025-07-08 18:25:22 +00:00
Ben Konyi
922e00ac3d
[ Tool ] Support upgrading to a new Flutter version pointing to the same revision as a previous version (#171783)
In the case of a bad release, we should be able to release a new version
of Flutter that points to the revision of the last good release.

This change updates the tool to not only compare framework revisions
when determining if the current installation is up to date, and also
updates the tag selection logic to pick the most recent version tag
first.

Fixes https://github.com/flutter/flutter/issues/170679
2025-07-08 17:32:15 +00:00
Mouad Debbar
17e63958f2
Run hot_restart_web_amd_test.dart on Mac/Windows (#171281)
Part of https://github.com/flutter/flutter/issues/171276
2025-07-08 16:09:18 +00:00
John "codefu" McDole
13d2219efd
feat: Use engine_stamp.json in flutter tool (#171454)
The flutter tool will now download and use an `engine_stamp.json` file
to determine the engine version, content hash, build date, and commit
date.

The file is treated as a new `DevelopmentArtifact.informative` and is
fetched before flutterVersion is used. This ensures we have build
information for a clean checkout with no bin/cache folder. Users that
download from flutter.dev will have engine_stamp.json, so its a no-op.

This change provides support for content hashed engine artifacts, who's
revision (the hash) is not a git commit sha. A side benefit is "git" is
only used at build time to extract this information.

> [!NOTE]
> Content hashed artifacts are not enabled yet for downloads;
bin/internal/engine.version (releases) and the shell updaters still look
for the git commit sha. One can test this out by setting
`FLUTTER_PREBUILD_ENGINE_VERSION` to the content hash.
2025-07-08 00:16:42 +00:00
Ben Konyi
a5541161e8
[ Tool ] Remove long-deprecated make-host-app-editable (#171715)
Fixes https://github.com/flutter/flutter/issues/59220
2025-07-08 00:09:26 +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
Ben Konyi
9de6f68267
[ Tool ] Fix crash when SIGQUIT is sent to enable the VM service for flutter analyze --watch (#171713)
The command was parsing stdout assuming all contents were JSON.

Fixes https://github.com/flutter/flutter/issues/58391
2025-07-07 20:41:26 +00:00
Mouad Debbar
9ed8f90761
Run hot_reload_web_test.dart on Mac/Windows (#171279)
Part of https://github.com/flutter/flutter/issues/171276
2025-07-07 20:03:55 +00:00
Ben Konyi
f64e35af94
[ Tool ] Prepare for enabling omit_obvious_*_types and specify_nonobvious_*_types (#171651)
Applying the specified lints will cause some minor breakages that can be
resolved before the lints are enforced.
2025-07-07 20:02:09 +00:00
Mouad Debbar
a9a2d74ac5
[web] Wasm minification default matches JS minification default (#171710)
The default minification behavior should be based on build mode.

Fixes https://github.com/flutter/flutter/issues/171702
2025-07-07 19:58:24 +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
3becc31be8
[ Widget Previews ] Add analytics for flutter widget-preview start (#171641)
Tracks the following metrics:

- Overall launch time with/without generating the widget preview
scaffold
- Time from detecting a file change within the tracked project to
actually loading the updated previews into the previewer

Fixes https://github.com/flutter/flutter/issues/166418
2025-07-04 20:38:26 +00:00
Ben Konyi
bcab634d60
[ Widget Preview ] Add a "Restart Widget Previewer" button to the widget preview scaffold (#171602)
This allows for developers to perform a hot restart on the preview
environment in the case they get into a bad state.

This change adds a `hotRestartPreviewer` method to the `widget-preview`
DTD service registered by the Flutter Tool, which is invoked by the
previewer.


![image](https://github.com/user-attachments/assets/477ce947-76a5-4e78-9769-0ee7f23f2ba6)
2025-07-04 17:57:24 +00:00
Ben Konyi
750b87f551
[ Widget Previews ] Add support for Pub Workspaces (#171538)
Updates the widget previewer to properly handle previews defined across
a workspace. This is effectively equivalent to displaying previews from
multiple individual projects, which required a fairly significant rework
to properly support:

 - resolving asset paths to the right project
 - loading assets across projects in the workspace
 - tracking changes to pubspec.yaml files across the workspace

While making this change, it became apparent that we don't need to
explicitly list the assets from the various projects explicitly in the
scaffold's pubspec.yaml as they're automatically pulled in by adding
those project's as dependencies and using the `package/$ASSET_PATH`
format to load the assets from the scaffold. This allowed for the
removal of a significant amount of logic related to building the
scaffold's pubspec.

Fixes https://github.com/flutter/flutter/issues/169268
2025-07-03 18:09:23 +00:00