mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
7886 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
cd45eb63ea
|
flutter_tool : Remove redundant enum types inside the enum definition scope (#181910)
see https://discord.com/channels/608014603317936148/1468007948637831220 ## 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]. **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 |
||
|
|
93756969bb
|
Directly generate a Mach-O dynamic library using gen_snapshot. [reland] (#181539)
Instead of generating assembly code that is then compiled to a Mach-O dynamic library, use the new app-aot-macho-dylib output option for gen_snapshot to generate the Mach-O dynamic library without the assembly step. This is a reland of https://github.com/flutter/flutter/pull/174870. No changes from the previously landed PR are needed, as the fixes for the App Store issue described in https://github.com/flutter/flutter/issues/178602 are all on the Dart side: https://github.com/dart-lang/sdk/commit/8cbf864. Related issues: * https://github.com/dart-lang/sdk/issues/43299 * https://github.com/dart-lang/sdk/issues/60307 * https://github.com/flutter/flutter/issues/178602 * https://github.com/dart-lang/sdk/issues/62414 ## 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. |
||
|
|
93df033057
|
Bump minimum required Xcode version to 15 and recommended to 16 (#180531)
This PR updates the Flutter tool's Xcode version requirements: - **Minimum required version**: 14 → 15 - **Recommended version**: 15 → 16 *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* Fixes #144582 ## 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. - [ ] 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]. - [ ] 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 |
||
|
|
3d4a270c75
|
[flutter_tools] Deprecate web hot reload flag (#181884)
Warn when the flag is passed, and prompt to file an issue if disabling is required for a web development workflow. The flag is enabled by default. It is still functional, but will be removed in an upcoming release. |
||
|
|
6583eac5a8
|
Remove Config complete log when using flutter build apk --config-only (#181864)
fixes: #160801 using verbose mode gives more details about what is happening , and so we can test if this a `--config-only` build or not. ## 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. - [ ] 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> |
||
|
|
eb1e24f46f
|
Remove the Flutter.xcframework as a swift dependency (#181739)
This PR keeps the FlutterFramework swift package introduced in https://github.com/flutter/flutter/pull/178931, but removes the Flutter.xcframework as a dependency, essentially making it empty. As such, it also restores the build scripts to copy and codesign the framework instead of letting Xcode do it. This is a temporary solution while we decide a long-term strategy: [go/flutter-ios-privacy-impacting-sdks-codesign-requirement](http://goto.google.com/flutter-ios-privacy-impacting-sdks-codesign-requirement) Fixes https://github.com/flutter/flutter/issues/181630. ## 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 |
||
|
|
8055170ac6
|
Remove unused getters on AndroidProject class (#181860)
## 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]. **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 |
||
|
|
9b30164e69
|
[ Tool ] Fix regression introduced in flutter/flutter#181421 (#181826)
`dev/devicelab/bin/task/flutter_test_performance.dart` regressed due to the CFE not being initialized with the correct dill file for the target test. This change updates `TestCompiler` to pass the correct dill file when creating the `ResidentCompiler` and adds a test to verify that the `ResidentCompiler` is initialized with the correct dill. |
||
|
|
c58b729f9d
|
Fix todo about replacing URL with constants in gradle_errors.dart (#181673)
## 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]. **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 |
||
|
|
467c009eea
|
[ Tool ] Cleanup ResidentCompiler initialization logic (#181421)
Moves the initialization logic for web and non-web compilers into the `ResidentCompiler` factory and reduces code duplication. Also bumps the flutter_tools Dart SDK version to ^3.10.0 to enable dot shorthands. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> |
||
|
|
b877bae05d
|
[native assets] Split debug info into .dsym files (#181533)
This PR splits the debug info from code assets into separate dsym files for MacOS and iOS. The splitting only happens if the build mode is not debug. This aligns with whether the debug symbols are separated out for the Flutter framework and the app Framework. Closes: https://github.com/flutter/flutter/issues/181377 Testing: Added some tests to the integration test |
||
|
|
bff9bbc1df
|
[flutter_tools] Deprecate plugin_ffi template (#181588)
Add deprecation marker to `flutter create --template=plugin_ffi`. The new way of bundling native code is `flutter create --template=package_ffi`. (Or if the Flutter Plugin API or Android Play components need to be bundled: `flutter create --template=plugin)` Issue: * https://github.com/flutter/flutter/issues/131209 |
||
|
|
386826cc61
|
[hooks] Don't run build hooks for code assets in flutter run (#181542)
Since https://github.com/flutter/flutter/pull/174685, the code assets are wrongly invoked on in the `flutter run` process (in addition to rightly in the `flutter assemble` process). This should not be the case: We don't know the target architectures we want to build for, neither do we know which native compiler is set by the native build system that is invoking us (https://github.com/flutter/flutter/pull/181004#pullrequestreview-3664863551). This PR changes the way the hooks are invoked: * From `flutter run` only run for data assets. (Unblocks https://github.com/flutter/flutter/pull/181004) * All other remaining calls, run for both. There might be locations where data assets could be disabled, but they are needed from the `DartBuild` target at least in some cases. The architecture becomes as follows: * `FlutterNativeAssetsBuildRunner` this is basically the wrapper around the `NativeAssetsBuildRunner` and there should be only one in a `flutter_tools` instance, unchanged. * `FlutterHookRunner` seems to be an interface to be able to supply fakes, unchanged. * `runFlutterSpecificHooks` get bool arguments whether they should build code assets and data assets. * The callers of these APIs know what asset types are needed in that context. The invocations added in https://github.com/flutter/flutter/pull/174685 should be data assets only. * Simplification: `FlutterHookRunnerNative.runHooks` does no longer use `globals.buildSystem.build`. Instead, it directly calls `runFlutterSpecificHooks`. * This completely avoids writing to the flutter build directory, which was the cause of https://github.com/flutter/flutter/issues/178529. * The `ProtocolExtension`s (which determine which asset types are built) are taken from `AssetBuildTarget`s, and take into account what asset types to build, unchanged. Tests: * Code assets covered by existing integration tests such as packages/flutter_tools/test/integration.shard/isolated/native_assets_test.dart * Data assets covered by existing integration tests such as packages/flutter_tools/test/integration.shard/isolated/dart_data_asset_test.dart * This PR completely deletes packages/flutter_tools/test/general.shard/build_system/targets/hook_runner_native_test.dart. It was a unit test that testsed the specific workaround, not the effect of the workaround. * I've manually tested the steps in https://github.com/flutter/flutter/issues/178529#issuecomment-3542651915, the issue does not come back. > the underlying issue did involve conflict between state written by the original run of the build system versus state written by the secondary run executed for the data assets. If the secondary run can be avoided, then that seems cleaner. Yep, removed. |
||
|
|
da72d5936d
|
Reverts "[ Tool / Engine ] Cleanup x86 references (#181152)" (#181643)
<!-- start_original_pr_link --> Reverts: flutter/flutter#181152 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: chingjun <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: broke internal tests. <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: bkonyi <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {mboetger, gaaclarke} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: Fixes https://github.com/flutter/flutter/issues/170142 <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com> |
||
|
|
b6fa57dd2e
|
[ Tool / Engine ] Cleanup x86 references (#181152)
Fixes https://github.com/flutter/flutter/issues/170142 |
||
|
|
c909c5801b
|
Replace pub run mentions with dart run (#181317)
Following up on https://github.com/dart-lang/pub/issues/4737, this PR replaces deprecated `pub run` commands with `dart run`. |
||
|
|
4be1725b6b
|
[Reland] Don't strip symbols from libapp.so on android by default (#181275)
Relands https://github.com/flutter/flutter/pull/162464 Fixes https://github.com/flutter/flutter/issues/170664 The only test that failed last time was `Linux_pixel_7pro android_obfuscate_test`, and I ran it locally (`flutter test test/integration.shard/android_obfuscate_test.dart `) to both repro the failure and verify it passes on this branch with the additional changes. Also does some stuff in the FGP: The reason we failed the tests last time was we were bundling of the libapp.so code into a jar in the aar case, instead of simply including it as its own file in the source sets. I let gemini go on that part, modifying it to no longer pack as a jar, but it looks correct to me. Now that the `libapp.so` file is simply included in this case, AGP is able to strip it (it's not hidden inside a jar). Because this changes the FGP build process for add to app, I manually verified that the add to app flow isn't broken for including a flutter module both as source and as an aar. <details> <summary>Before and after logs from the gradle task output</summary> Before: ``` > Task :flutter:stripReleaseDebugSymbols NO-SOURCE Skipping task ':flutter:stripReleaseDebugSymbols' as it has no source files and no previous output files. ``` After: ``` Task ':flutter:stripReleaseDebugSymbols' is not up-to-date because: No history is available. The input changes require a full rebuild for incremental task ':flutter:stripReleaseDebugSymbols'. C/C++: android.ndkVersion from module build.gradle is [28.2.13676358] C/C++: android.ndkVersion from module build.gradle is [28.2.13676358] C/C++: android.ndkPath from module build.gradle is not set C/C++: android.ndkPath from module build.gradle is not set C/C++: ndk.dir in local.properties is not set C/C++: ndk.dir in local.properties is not set C/C++: Not considering ANDROID_NDK_HOME because support was removed after deprecation period. C/C++: Not considering ANDROID_NDK_HOME because support was removed after deprecation period. C/C++: android.ndkVersion from module build.gradle is [28.2.13676358] C/C++: android.ndkPath from module build.gradle is not set C/C++: sdkFolder is /Users/mackall/Library/Android/sdk C/C++: ndk.dir in local.properties is not set C/C++: Not considering ANDROID_NDK_HOME because support was removed after deprecation period. C/C++: sdkFolder is /Users/mackall/Library/Android/sdk C/C++: sdkFolder is /Users/mackall/Library/Android/sdk Starting process 'command '/Users/mackall/Library/Android/sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip''. Working directory: /Users/mackall/development/BugTesting/mblahm/.android/Flutter Command: /Users/mackall/Library/Android/sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip --strip-unneeded -o /Users/mackall/development/BugTesting/mblahm/.android/Flutter/build/intermediates/stripped_native_libs/release/stripReleaseDebugSymbols/out/lib/armeabi-v7a/libapp.so /Users/mackall/development/BugTesting/mblahm/.android/Flutter/build/intermediates/merged_native_libs/release/mergeReleaseNativeLibs/out/lib/armeabi-v7a/libapp.so Starting process 'command '/Users/mackall/Library/Android/sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip''. Working directory: /Users/mackall/development/BugTesting/mblahm/.android/Flutter Command: /Users/mackall/Library/Android/sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip --strip-unneeded -o /Users/mackall/development/BugTesting/mblahm/.android/Flutter/build/intermediates/stripped_native_libs/release/stripReleaseDebugSymbols/out/lib/x86_64/libapp.so /Users/mackall/development/BugTesting/mblahm/.android/Flutter/build/intermediates/merged_native_libs/release/mergeReleaseNativeLibs/out/lib/x86_64/libapp.so Starting process 'command '/Users/mackall/Library/Android/sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip''. Working directory: /Users/mackall/development/BugTesting/mblahm/.android/Flutter Command: /Users/mackall/Library/Android/sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip --strip-unneeded -o /Users/mackall/development/BugTesting/mblahm/.android/Flutter/build/intermediates/stripped_native_libs/release/stripReleaseDebugSymbols/out/lib/arm64-v8a/libapp.so /Users/mackall/development/BugTesting/mblahm/.android/Flutter/build/intermediates/merged_native_libs/release/mergeReleaseNativeLibs/out/lib/arm64-v8a/libapp.so Successfully started process 'command '/Users/mackall/Library/Android/sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip'' Successfully started process 'command '/Users/mackall/Library/Android/sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip'' Successfully started process 'command '/Users/mackall/Library/Android/sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-strip'' ``` </details> ## 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> |
||
|
|
72321c82f9
|
bump KGP and AGP max known versions (#181325)
Fixes #181228 ## 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 |
||
|
|
eba55c792c
|
Look for project root for FeatureFlags manifest (#180689)
Fixes #176294. The `FeatureFlags` service is now instantiated with the manifest parsed not from `<current working directory>/pubspec.yaml`, but from `findProjectRoot(cwd)` (falling back to old behavior). ## 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 |
||
|
|
5d08844eb1
|
[ Tool ] Fix update-packages failing due to mismatched dependencies between flutter_tools and the framework (#181335)
Since the `widget_preview_scaffold` project depends on both the Flutter SDK and `flutter_tools`, `flutter_tools` must use the same version pins as the Flutter SDK. This change ensures that any packages used by both the Flutter SDK and `flutter_tools` use the same pinned version. Fixes https://github.com/flutter/flutter/issues/180503 |
||
|
|
2cb1844dc5
|
Fixes macOS App.framework not being codesigned or find framework (#181348)
When SwiftPM is enabled, it doesn't embed/codesign the Flutter framework via Flutter tooling since it's now handled by Xcode. There was a bug in this, though, which prevented the App.framework from being codesigned. This PR fixes that. Fixes https://github.com/flutter/flutter/issues/181056. ## 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 |
||
|
|
a3cfa715b1
|
Add FlutterFramework as an Xcode SwiftPM local package override (#179512)
This PR adds the FlutterFramework as an Xcode local package override by adding it as a "file" to the Xcode project. In addition, it also adds the plugin as a local package override if we detect the app is a plugin's example app. <img width="265" height="144" alt="Screenshot 2025-12-04 at 10 29 16 PM" src="https://github.com/user-attachments/assets/b822aa3c-14bd-4444-9e44-4e781a5ac11e" /> Fixes https://github.com/flutter/flutter/issues/179032. Fixes https://github.com/flutter/flutter/issues/172427. ## 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 |
||
|
|
b74475af9d
|
[ Widget Preview ] Fix crash when @Preview annotations appeared outside of lib/ (#180768)
The widget preview scaffold requires that previews are defined within importable libraries. Since Dart does not support absolute paths for imports or relative imports outside of the project, it's not possible for the widget previewer to display previews defined outside of `lib/`. This change updates the preview detector to ignore libraries that don't have a package name (e.g., libraries under `test/`) and updates `packageName` properties to not allow for null to make it clear that package names are required for previews. Fixes https://github.com/flutter/flutter/issues/178651 |
||
|
|
8af18377be
|
[ Tool ] Ensure flutter.version.json is regenerated on upgrade (#180857)
The tool performs various checks to determine whether or not to regenerate version information as part of a `flutter upgrade` instead of just regenerating `flutter.version.json` as part of each `flutter upgrade`. This has lead to some situations where the actual framework version doesn't match that reported by the `flutter.version.json`. This change updates `flutter upgrade` to always regenerate `flutter.version.json` after checking out the new version of the framework to ensure that it contains the latest version information. Fixes https://github.com/flutter/flutter/issues/178926 |
||
|
|
d316469e1d
|
Add Flutter as a Swift Package dependency (#178931)
The main purpose of this PR is to add the Flutter framework as a Swift Package dependency. As such, Xcode will now handle the copying, thinning, and codesigning of the framework and therefore the Flutter Xcode Run Scripts shouldn't. This will allow plugins to declare a dependency on the Flutter framework package and eliminate the need for the Pre-Action "prepare" script. This PR does not technically make the Flutter framework a local package override, that will be added in a follow up PR: https://github.com/flutter/flutter/pull/179512 This change includes: * Generation of the FlutterFramework swift package (this will generate a Package.swift and symlink to the Flutter framework in the artifact cache) <img width="400" height="271" alt="Screenshot 2025-12-04 at 4 54 43 PM" src="https://github.com/user-attachments/assets/6cfde6da-3698-4b76-b3b1-725f91fbf58d" /> * Adding the FlutterFramework as a dependency to the FlutterGeneratedPluginSwiftPackage (which the the Swift package the Xcode project has a dependency on) <img width="400" height="195" alt="Screenshot 2025-12-04 at 4 55 13 PM" src="https://github.com/user-attachments/assets/30fa402a-6a11-4df0-b2cd-a4a82197e50a" /> ### Change to Flutter Run Scripts Flutter currently has 3 Xcode Run Scripts: * prepare (happens in a scheme pre-action) * [PREVIOUS] Via `flutter assemble` - copies the Flutter framework from engine build cache to `BUILT_PRODUCTS_DIR` * [NEW] Same as previous except skips codesigning. This is still included to accommodate plugins that don't have a dependency declared on the Flutter framework. * build (happens in first Run Script in the Xcode build phases that happens before compiling) * [PREVIOUS] Via `flutter assemble` - copies, thins, and codesigns Flutter framework into `BUILT_PRODUCTS_DIR` * [NEW] Is skipped, Xcode now does this * embed_and_thin (happens in second Run Script in the Xcode build phases after compiling, linking, and embedding) * [PREVIOUS] Copies Flutter framework from `BUILT_PRODUCTS_DIR` to `TARGET_BUILD_DIR` * [NEW] * Validates Flutter framework in `BUILT_PRODUCTS_DIR` & `TARGET_BUILD_DIR` (which would have been put there by Xcode via SwiftPM) matches the Flutter framework in the engine cache. * If it matches, do not copy. Xcode now does this. * If it doesn't: * Call `flutter assemble` to copy the correct Flutter framework into `BUILT_PRODUCTS_DIR` * Then copy from `BUILT_PRODUCTS_DIR` to `TARGET_BUILD_DIR`. Fixes https://github.com/flutter/flutter/issues/166489. ## 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 |
||
|
|
d47b499157
|
[ Tool ] Handle DartDevelopmentServiceException when launching web applications (#180905)
DWDS can throw `DartDvelopmentServiceException` if DDS fails to connect to DWDS due to the target application shutting down immediately after launch. This change adds logic to catch this exception and exit gracefully. Fixes https://github.com/flutter/flutter/issues/178151 --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> |
||
|
|
4e92c27d57
|
[ Tool ] Fix flutter run -d all crash (#180845)
661b8edef229499c0a919f4fd6ceebf935529243 introduced changes related to build hooks that made assumptions about the value of the detected target platform, effectively restricting `flutter run` to targeting single devices. This change fixes the regression which prevented developers from deploying their application to multiple devices with `flutter run -d all`. Fixes https://github.com/flutter/flutter/issues/179857 |
||
|
|
1ccfb37b0f
|
fix: there are no riscv fuchsia artifacts (#180779)
In #178711, `packages/flutter_tools/lib/src/flutter_cache.dart` was updated to add 'riscv' downloading in the `FlutterRunnerDebugSymbols`. This class is not well named and is responsible for downloading "the debug symbols for flutter runner for Fuchsia development." We do not produce fuchsia riscv. Fixes #180775 |
||
|
|
a3c12e636d
|
[ Tool ] Add support for linux riscv64 architecture (#178711)
This adds support for buildind desktop linux applications for riscv64 on the flutter tool, as well as basic riscv64 support for the tool. This is a first move towards fixing #99963. Along with https://github.com/flutter/flutter/pull/178712 that allows building an engine for `riscv64`, this PR allows me to build and run the flutter 'hello world' app on RISC-V hardware: <img width="1920" height="1080" alt="Screenshot from 2025-11-18 08-58-03" src="https://github.com/user-attachments/assets/5e90bc7f-49a7-41a8-82b7-5a5d3247938a" /> This allows someone who built a flutter engine and exposed it on a webserver to run commands like: ``` export FLUTTER_STORAGE_BASE_URL=http://your-server-url flutter flutter doctor cd example/hello_world && flutter build linux ``` This means that even if Google does not want to support Flutter on RISC-V officially (hosting the artifacts), community-managed servers could host the RISC-V flutter engines/artifacts. It also means that internally, companies using Flutter on RISC-V would just have to build their engine and setup such a server, and it allows them to use the upstream Flutter tool. ## 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. - [ ] 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: John "codefu" McDole <codefu@google.com> |
||
|
|
0cfc04170d
|
Reverts "Unpin google_mobile_ads (#180573)" (#180761)
<!-- start_original_pr_link --> Reverts: flutter/flutter#180573 <!-- end_original_pr_link --> <!-- start_initiating_author --> Initiated by: jtmcdole <!-- end_initiating_author --> <!-- start_revert_reason --> Reason for reverting: broke in post submit. Requires running the lockfile generation script <!-- end_revert_reason --> <!-- start_original_pr_author --> Original PR Author: goderbauer <!-- end_original_pr_author --> <!-- start_reviewers --> Reviewed By: {vashworth} <!-- end_reviewers --> <!-- start_revert_body --> This change reverts the following previous change: Fixes https://github.com/flutter/flutter/issues/156912. Fly-by clean-up: With the recent bump to Xcode I believe pinning `google_mobile_ads` is no longer necessary. I verified locally with `flutter build ios --verbose` that the `dev/benchmarks/platform_views_layout` build successfully. <details> <summary>Build Log</summary> ``` $ flutter build ios Resolving dependencies in `/Users/goderbauer/dev/flutter`... Downloading packages... _fe_analyzer_shared 89.0.0 (92.0.0 available) adaptive_breakpoints 0.1.7 (discontinued) analyzer 8.2.0 (9.0.0 available) archive 3.6.1 (4.0.7 available) device_info 2.0.3 (discontinued replaced by device_info_plus) ffigen 18.1.0 (20.1.1 available) gcloud 0.8.19 (0.9.0 available) googleapis 12.0.0 (15.0.0 available) googleapis_auth 1.6.0 (2.0.0 available) isolate 2.1.1 (discontinued) js 0.7.2 (discontinued) metrics_center 1.0.13 (1.0.14 available) pedantic 1.11.1 (discontinued replaced by lints) petitparser 6.1.0 (7.0.1 available) shelf_web_socket 2.0.1 (3.0.0 available) xml 6.5.0 (6.6.1 available) Got dependencies in `/Users/goderbauer/dev/flutter`! 5 packages are discontinued. 11 packages have newer versions incompatible with dependency constraints. Try `flutter pub outdated` for more information. Building com.yourcompany.platformViewsLayout for device (ios-release)... To ensure your app continues to launch on upcoming iOS versions, UIScene lifecycle support will soon be required. Please see https://flutter.dev/to/uiscene-migration for the migration guide. Warning: Missing build name (CFBundleShortVersionString). Warning: Missing build number (CFBundleVersion). Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store. Found saved certificate choice "Apple Development: Michael Goderbauer (WY4DWBNV57)". To clear, use "flutter config --clear-ios-signing-settings". Developer identity "Apple Development: Michael Goderbauer (WY4DWBNV57)" selected for iOS code signing Running pod install... 1,233ms Running Xcode build... Xcode build done. 32.5s ✓ Built build/ios/iphoneos/Runner.app (20.9MB) ``` </details> <!-- end_revert_body --> Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com> |
||
|
|
c1e1dc260f
|
Unpin google_mobile_ads (#180573)
Fixes https://github.com/flutter/flutter/issues/156912. Fly-by clean-up: With the recent bump to Xcode I believe pinning `google_mobile_ads` is no longer necessary. I verified locally with `flutter build ios --verbose` that the `dev/benchmarks/platform_views_layout` build successfully. <details> <summary>Build Log</summary> ``` $ flutter build ios Resolving dependencies in `/Users/goderbauer/dev/flutter`... Downloading packages... _fe_analyzer_shared 89.0.0 (92.0.0 available) adaptive_breakpoints 0.1.7 (discontinued) analyzer 8.2.0 (9.0.0 available) archive 3.6.1 (4.0.7 available) device_info 2.0.3 (discontinued replaced by device_info_plus) ffigen 18.1.0 (20.1.1 available) gcloud 0.8.19 (0.9.0 available) googleapis 12.0.0 (15.0.0 available) googleapis_auth 1.6.0 (2.0.0 available) isolate 2.1.1 (discontinued) js 0.7.2 (discontinued) metrics_center 1.0.13 (1.0.14 available) pedantic 1.11.1 (discontinued replaced by lints) petitparser 6.1.0 (7.0.1 available) shelf_web_socket 2.0.1 (3.0.0 available) xml 6.5.0 (6.6.1 available) Got dependencies in `/Users/goderbauer/dev/flutter`! 5 packages are discontinued. 11 packages have newer versions incompatible with dependency constraints. Try `flutter pub outdated` for more information. Building com.yourcompany.platformViewsLayout for device (ios-release)... To ensure your app continues to launch on upcoming iOS versions, UIScene lifecycle support will soon be required. Please see https://flutter.dev/to/uiscene-migration for the migration guide. Warning: Missing build name (CFBundleShortVersionString). Warning: Missing build number (CFBundleVersion). Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store. Found saved certificate choice "Apple Development: Michael Goderbauer (WY4DWBNV57)". To clear, use "flutter config --clear-ios-signing-settings". Developer identity "Apple Development: Michael Goderbauer (WY4DWBNV57)" selected for iOS code signing Running pod install... 1,233ms Running Xcode build... Xcode build done. 32.5s ✓ Built build/ios/iphoneos/Runner.app (20.9MB) ``` </details> |
||
|
|
96403e0fa5
|
Reverts "Fix iOS xattr removal to clear all extended attributes (#180355)" (#180709)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#180355
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: jmagman
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: this broke post-submit
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: Saqib198
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: {vashworth, jmagman}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
Fixed iOS code signing failures caused by extended attributes like
com.apple.provenance.
Problem: On macOS 15+ with Xcode 26.1+, iOS builds fail during code
signing with:
resource fork, Finder information, or similar detritus not allowed
This happens because com.apple.provenance (added by cloud storage
services, Finder, or file downloads) was not being removed - only
com.apple.FinderInfo was cleared.
Fix: Changed xattr -r -d com.apple.FinderInfo to xattr -cr to remove ALL
extended attributes recursively.
Fixes #180351
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.
<!-- end_revert_body -->
The error:
```
Could not delete `/opt/s/w/ir/x/w/rc/tmpxc3h1o2b/flutter sdk/dev/integration_tests/flavors/build/ios/Debug Paid-iphoneos/Flutter` because it was not created by the build system and it is not a subfolder of derived data.
note: To mark this directory as deletable by the build system, run `xattr -w com.apple.xcode.CreatedByBuildSystem true '/opt/s/w/ir/x/w/rc/tmpxc3h1o2b/flutter sdk/dev/integration_tests/flavors/build/ios/Debug Paid-iphoneos/Flutter'` when it is created.
```
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8693206125415137281/+/u/run_flavors_test_ios/stdout
Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
|
||
|
|
40d28b0e9c
|
[web] Don't serve files outside of project (#180699)
Fixes internal bug: b/463611148 |
||
|
|
f004160865
|
Fix iOS xattr removal to clear all extended attributes (#180355)
Fixed iOS code signing failures caused by extended attributes like com.apple.provenance. Problem: On macOS 15+ with Xcode 26.1+, iOS builds fail during code signing with: resource fork, Finder information, or similar detritus not allowed This happens because com.apple.provenance (added by cloud storage services, Finder, or file downloads) was not being removed - only com.apple.FinderInfo was cleared. Fix: Changed xattr -r -d com.apple.FinderInfo to xattr -cr to remove ALL extended attributes recursively. Fixes #180351 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. |
||
|
|
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 |
||
|
|
93cba59cee
|
flutter_tools: Auto-generate ExportOptions.plist for manual iOS code signing (#177888)
# flutter_tools: Auto-generate ExportOptions.plist for manual iOS code signing ## Summary Enhance `flutter build ipa` to automatically generate a complete ExportOptions.plist for manual code signing configurations, eliminating the need for users to create and maintain one manually. **Fixes:** #177853 ## Problem When using manual code signing (`CODE_SIGN_STYLE=Manual`) with `flutter build ipa` for Release/Profile builds, the archive succeeds but the export step fails with: ``` error: exportArchive: "Runner.app" requires a provisioning profile with the Push Notifications and Sign in with Apple features. ``` **Root cause:** Flutter generated an incomplete ExportOptions.plist that only included `method` and `uploadBitcode`. When using manual signing, `xcodebuild -exportArchive` requires: - `teamID` (from project's `DEVELOPMENT_TEAM`) - `signingStyle=manual` - `provisioningProfiles` (mapping bundle ID to provisioning profile UUID) Without these, Xcode cannot resolve the provisioning profile for export, even if the profile is correctly configured and contains the required entitlements. ## Solution Enhanced `_createExportPlist()` in `BuildIOSArchiveCommand` to automatically generate a complete ExportOptions.plist when: 1. `CODE_SIGN_STYLE=Manual` is detected for the main app target 2. Build mode is Release or Profile (production builds only) 3. A valid provisioning profile can be located and parsed The generated plist includes: - `method` (app-store, ad-hoc, enterprise, etc. - respects user's `--export-method` flag) - `teamID` (from `DEVELOPMENT_TEAM` build setting) - `signingStyle=manual` - `provisioningProfiles` mapping main app bundle ID to provisioning profile UUID **Fallback behavior:** - If profile lookup fails: silently fall back to simple plist (no regression) - For Automatic signing: unchanged behavior - For Debug builds: unchanged behavior (not App Store export) - For multi-target apps (extensions): falls back to simple plist today (see TODO below) ## Changes ### Core Implementation - Added `ProfileData` class to encapsulate provisioning profile info (UUID and name) - Refactored profile handling into reusable static methods for testability - Enhanced `_createExportPlist()` with manual signing detection and profile lookup - Added `_findProvisioningProfileUuid()` to locate provisioning profiles by specifier - Added `_parseProvisioningProfileInfo()` to decode provisioning profile data once - Added comprehensive trace logging for debugging ### Testing - Created `build_ipa_export_plist_test.dart` with 7 unit tests covering: - Manual signing with profile found → enhanced plist generated ✓ - Automatic signing → simple plist (unchanged behavior) ✓ - Debug builds → simple plist (unchanged behavior) ✓ - Different export methods → respected in generated plist ✓ - Profile lookup failures → fallback to simple plist ✓ - Null codeSignStyle → handled gracefully ✓ - All existing flutter_tools tests continue to pass ## Documentation Added extensive inline comments explaining: - Enhancement conditions and fallback behavior - Provisioning profile search strategy and error handling - Performance and security considerations - Future enhancements (multi-target support) ## Safety & Scope ### What This Fixes - ✅ Manual signing export failures for apps with Push Notifications / Sign in with Apple - ✅ Auto-generates correct plist for **any** entitlements covered by provisioning profile - ✅ Unblocks users from manual `--export-options-plist` workaround - ✅ Improves iOS build UX for enterprise teams doing manual signing ### What This Does NOT Change - ✅ Automatic signing behavior (unchanged) - ✅ Debug builds (unchanged) - ✅ CLI interface (no new flags) - ✅ Ad-hoc / enterprise distributions (unchanged if not using manual signing) ### Known Limitations (Future Enhancements) - Currently only supports single-target apps (main app bundle ID only) - TODO: Multi-target apps with extensions (notification service, widgets, watch, etc.) - each extension target bundle ID may need separate entry in provisioningProfiles dict - TODO: Support for multiple provisioning profiles if app uses multiple signing identities --- ## Pre-merge Checklist - [x] I have signed the CLA - [x] I read the Contributor Guide and Tree Hygiene docs - [x] I linked the issue this fixes (#177853) and explained the failure scenario - [x] I added documentation and trace logs so developers understand what changed - [x] I added comprehensive unit tests for the new behavior - [x] All existing and new tests pass locally (`flutter test packages/flutter_tools`) - [x] Code passes linting (`dart analyze`) ## Safety Notes - [x] This code only runs for manual code signing in `flutter build ipa` for Release/Profile builds - [x] Debug builds and automatic signing behavior are completely unchanged - [x] If no provisioning profile UUID is found, we silently fall back to the old exportOptions.plist logic instead of failing - [x] Added trace-level logging explaining success/fallback scenarios for debugging - [x] No breaking changes - existing workarounds continue to work - [x] Minimal blast radius - only affects manual signing export path ## Verification Users can verify the fix by: 1. Creating an iOS app with `CODE_SIGN_STYLE=Manual`, `DEVELOPMENT_TEAM` set, and Push Notifications entitlements 2. Running `flutter build ipa --release --verbose` 3. Confirming the trace log shows "Generated ExportOptions.plist with teamID, signingStyle=manual, and provisioningProfiles" 4. Verifying the IPA is successfully created without needing `--export-options-plist` --- ## Related Issues - #106612 - Support `flutter build ipa` with manual signing and provisioning profiles - #113977 - Flutter build IPA with --export-options-plist not working --------- Co-authored-by: Elijah Okoroh <okorohelijah@google.com> |
||
|
|
941130b9f1
|
Revert "Directly generate a Mach-O dynamic library using gen_snapshot [reland] (#174870) (#180639)
This reverts commit 4b6e0bdcfacd39f01fad4529217188db3ce516c8. Fixes https://github.com/flutter/flutter/issues/178602. ## 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 |
||
|
|
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. |
||
|
|
55b609466f
|
Unpin DDS (#180571)
Fly-by clean-up: My understanding from the [changelog](https://pub.dev/packages/dds/changelog) is that the change causing the bug in 5.0.4 has been reverted in 5.0.5. Therefore, the pin should be no longer necessary? Unpinning to find out... > 5.0.5 [DAP] The change in DDS 5.0.4 to individually add/remove breakpoints has been reverted and may be restored in a future version. > >5.0.4 [DAP] Breakpoints are now added/removed individually instead of all being cleared and re-added during a setBreakpoints request. This improves performance and can avoid breakpoints flickering between unresolved/resolved when adding new breakpoints in the same file. |
||
|
|
15c48f2922
|
[ Widget Preview ] Add support for dart:ffi imports (#180586)
Adds logic to pass `--include-unsupported-platform-library-stubs` to the CFE when launched via `flutter widget-preview start`, as well as logic to ensure the flag can't be passed as an extra frontend option to bypass compile time errors due to imports of unsupported libraries. Fixes https://github.com/flutter/flutter/issues/166431 |
||
|
|
9766a97c54
|
Add --web-define flag for template variable injection in Flutter web builds (#175805)
<!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> ## Add --web-define option for runtime variable injection in Flutter web templates This PR adds support for injecting environment-specific variables into Flutter web templates during development and build processes through a new `--web-define` command-line option. ### What this changes **Before**: Developers had to manually edit HTML templates or use build-time workarounds to inject environment-specific values (API URLs, feature flags, etc.) into Flutter web applications. **After**: Developers can now use `--web-define KEY=VALUE` to inject variables directly into web templates using `{{VARIABLE_NAME}}` placeholders. ### Key features - **Template variable substitution**: Support for `{{VARIABLE_NAME}}` placeholders in `index.html` and `flutter_bootstrap.js` - **Runtime validation**: Throws clear errors when required variables are missing with helpful suggestions - **Command-line integration**: Works with both `flutter run` and `flutter build web` commands - **Multiple variable support**: Can define multiple variables in a single command - **Built-in variable protection**: Ignores Flutter's built-in template variables during validation ### Usage examples ```bash # Development with API configuration flutter run -d chrome --web-define=API_URL=https://dev-api.example.com --web-define=DEBUG_MODE=true # Production build with environment variables flutter build web --web-define=API_URL=https://api.example.com --web-define=ANALYTICS_ID=GA-123456 --web-define=DEBUG_MODE=false # Multiple environments flutter run -d chrome --web-define=ENV=staging --web-define=FEATURE_X=enabled ``` ### Template usage In your `web/index.html`: ```html <script> window.config = { apiUrl: '{{API_URL}}', environment: '{{ENV}}', debugMode: {{DEBUG_MODE}} }; </script> ``` ### Error handling If a variable is missing, the tool provides clear feedback: ``` Missing web-define variable: API_URL Please provide the missing variable using: flutter run --web-define=API_URL=VALUE or flutter build web --web-define=API_URL=VALUE ``` ## Issues fixed Fixes https://github.com/flutter/flutter/issues/127853 ## Additional Usage Examples ### Environment-Specific Configurations (Flavors) ```bash # Development flutter run -d chrome --web-define=ENV=dev --web-define=API_URL=http://localhost:3000 --web-define=DEBUG=true # Production flutter build web --web-define=ENV=prod --web-define=API_URL=https://api.example.com --web-define=DEBUG=false ``` **Template:** ```html <script> window.config = { environment: '{{ENV}}', apiUrl: '{{API_URL}}', debugMode: {{DEBUG}} }; </script> ``` ### Dynamic Asset Loading ```bash flutter build web --web-define=CDN_URL=https://cdn.example.com --web-define=LOGO_PATH=/assets/logo.png ``` **Template:** ```html <link rel="icon" href="{{CDN_URL}}{{LOGO_PATH}}"> <link rel="stylesheet" href="{{CDN_URL}}/styles/theme.css"> ``` ### Analytics Integration ```bash flutter build web --web-define=GA_ID=G-XXXXXXXXXX --web-define=SENTRY_DSN=https://xxx@sentry.io/123 ``` **Template:** ```html <script async src="https://www.googletagmanager.com/gtag/js?id={{GA_ID}}"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '{{GA_ID}}'); </script> ``` ### Feature Flags ```bash flutter run -d chrome --web-define=FEATURE_X=true --web-define=FEATURE_Y=false ``` **Template:** ```html <script> window.features = { featureX: {{FEATURE_X}}, featureY: {{FEATURE_Y}} }; </script> ``` ### Multi-Tenant/White-Label Apps ```bash flutter build web --web-define=TENANT=acme --web-define=PRIMARY_COLOR=#FF5733 --web-define=LOGO_URL=https://cdn.acme.com/logo.png ``` **Template:** ```html <head> <title>{{TENANT}} Portal</title> <link rel="icon" href="{{LOGO_URL}}"> <style>:root { --primary: {{PRIMARY_COLOR}}; }</style> </head> ``` ### Backend Service URLs ```bash flutter build web \ --web-define=API_URL=https://api.example.com \ --web-define=WS_URL=wss://ws.example.com \ --web-define=AUTH_DOMAIN=auth.example.com ``` **Template:** ```html <script> window.services = { api: '{{API_URL}}', websocket: '{{WS_URL}}', auth: '{{AUTH_DOMAIN}}' }; </script> ``` ### SEO & Meta Tags ```bash flutter build web --web-define=APP_TITLE="My App" --web-define=APP_DESC="Description" --web-define=OG_IMAGE=https://example.com/og.png ``` **Template:** ```html <head> <title>{{APP_TITLE}}</title> <meta name="description" content="{{APP_DESC}}"> <meta property="og:title" content="{{APP_TITLE}}"> <meta property="og:image" content="{{OG_IMAGE}}"> </head> ``` ### Build Automation ```json { "scripts": { "dev": "flutter run -d chrome --web-define=ENV=dev --web-define=API_URL=http://localhost:3000", "prod": "flutter build web --web-define=ENV=prod --web-define=API_URL=https://api.example.com" } } ``` ### Important Notes - **Security**: Never expose secrets via `--web-define` (client-side only) ## 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> Co-authored-by: Ben Konyi <bkonyi@google.com> Co-authored-by: Mouad Debbar <mdebbar@google.com> |
||
|
|
26788b4a22
|
Forward proxy 404 responses to client (#179858)
## Description Forward 404 responses from proxied backend to client instead of serving index.html fallback. Fixes https://github.com/flutter/flutter/issues/178754 ## 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]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. [Contributor Guide]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md Contribution by talabat: <img src="https://talabat-flutterstream.web.app/assets/assets/flutterstream.png" width=60 /> Co-authored-by: Ben Konyi <bkonyi@google.com> |
||
|
|
fb865310c1
|
Restore CLI precedence for web headers and HTTPS over web_dev_config.yaml (#179639)
This PR restores the correct precedence behavior for web development server configuration. Since Flutter 3.38, CLI arguments were being ignored when `web_dev_config.yaml` was present — specifically for HTTPS and headers. According to the design and documentation, the precedence should be: 1. Command-line arguments (highest priority) 2. `web_dev_config.yaml` 3. Built-in defaults (lowest priority) ## Root Cause The regression affected: * **HTTP headers** — merge order was reversed, causing file config to override CLI * **HTTPS config** — CLI TLS arguments were ignored under certain conditions Note: `--web-port` and `--web-hostname` were already working correctly due to the `host ?? this.host` and `port ?? this.port` pattern. The observed issue was due to headers + HTTPS only. ## Changes Made * Fixed header merge order so CLI takes precedence * Corrected HTTPS config resolution and precedence logic * Unified logic across `run` and `drive` commands * Simplified HTTPS handling using `HttpsConfig.parse()` * Added tests for CLI precedence behavior ## Before (broken) ``` flutter run -d chrome --web-tls-cert-path cert.pem ``` ❌ CLI TLS args ignored when config file existed ❌ headers overridden by file config ## After (fixed) ``` flutter run -d chrome --web-tls-cert-path cert.pem ``` ✅ CLI TLS args respected ✅ headers override config as expected ## Tests * Added tests verifying CLI takes precedence * All existing and new tests pass * No breaking changes introduced ## Fixes Fixes: #179014 --------- Co-authored-by: Kevin Moore <kevmoo@google.com> Co-authored-by: Kevin Moore <kevmoo@users.noreply.github.com> Co-authored-by: Ben Konyi <bkonyi@google.com> |
||
|
|
a0a27839c6
|
[hooks] Don't require NDK for Android targets (#180594)
When targeting Android, don't fail in Flutter tools if the NDK is not installed. Instead, pass a `null` c compiler config to the hooks. The hooks can then decide to fail if they need the NDK. If no hook happened to require the NDK, Flutter for Android apps can be built without the NDK installed. Bug: https://github.com/flutter/flutter/issues/180163 ## 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. |
||
|
|
afb13d8bb7
|
[ Widget Preview ] Add UUID to registered DTD streams and services (#180140)
DTD only supports a single instance of a registered service with a given name. For widget preview development, we sometimes want to use a DTD instance that's attached to an IDE to test IDE integration. However, IDEs frequently spawn their own widget preview instances which register services with DTD. In the case where `flutter widget-preview start --dtd-url=<dtd-url>` is run and `dtd-url` points to a DTD instance with another widget preview service running, the process simply crashes. This change adds a unique identifier to the widget preview DTD service and stream names that allows for each `flutter widget-preview start` instance to register its own unique widget preview DTD services, even if other widget preview instances are using the same DTD instance. Fixes https://github.com/flutter/flutter/issues/179883 |
||
|
|
0f2514a61d
|
Remove @override annotations from things which are not overrides (#180417)
These annotations are applied to top-level elements, which override nothing. A new warning from the Analyzer will start to report these. |
||
|
|
96ae88f398
|
Pass canaryFeatures to BuildSettings (#180108)
Previously, this made little difference as DWDS used this only in one case with expression evaluation but now that the load strategies have diverged based on this flag, we should correctly always pipe this flag. This fixes an issue with a future DWDS version. ## 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 `///`). - [ ] 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. |
||
|
|
f804fb5b4e
|
Add explicit --cross-origin-isolation flag to flutter run. (#180026)
Fixes https://github.com/flutter/flutter/issues/163479 This adds a flag, `--cross-origin-isolation`/`--no-cross-origin-isolation` that allows the user to explicitly control whether `flutter run`/`drive`/`test` serves files with COOP/COEP headers. If the user doesn't specify, it uses cross origin isolation when wasm is enabled and no cross origin isolation when wasm is disabled. |
||
|
|
aafc925958
|
[AGP 9] Fix-Forward Website URL (#180018)
Need to fix-forward website url. Minor change from `https://docs.flutter.dev/release/breaking-changes/update-to-AGP-9` to `https://docs.flutter.dev/release/breaking-changes/migrate-to-agp-9` Should align with the file convention from this website PR: https://github.com/flutter/website/pull/12825 ## 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 |
||
|
|
abe119cf64
|
[AGP 9] Added Flutter Errors (#179765)
Added Flutter errors that direct users to Updating to AGP 9 Flutter docs. The doc outlines the changes that must be made in order to successfully build Flutter apps on Android using AGP 9+. As of this moment, the doc has yet to be written. The errors just have to be cherry picked to stable and beta by Tuesday, 12/16. The Flutter doc PR [here](https://github.com/flutter/website/pull/12825) can land later. Resolves https://github.com/flutter/flutter/issues/179914 ## 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. - [ ] 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 |