Here's another PR with a couple of typos fixed. As you can see there was a typo in _fileReferenceI**n**dentifiers_, in class _ParsedProjectInfo._ Maybe we should do some check on that since I'm not sure if that property is used somewhere outside Flutter?
This PR contributes to https://github.com/flutter/flutter/issues/130459
### Description
- Adds `examples/api/test/widgets/gesture_detector/gesture_detector.0_test.dart` test
- Adds `examples/api/test/widgets/gesture_detector/gesture_detector.1_test.dart` test
Reverts: flutter/flutter#139164
Initiated by: chunhtai
Reason for reverting: hard breaking change
Original PR Author: chunhtai
Reviewed By: {justinmc}
This change reverts the following previous change:
Adds a generic type and pop result to popscope and its friend.
The use cases are to be able to capture the result when the pop is called.
migration guide: https://github.com/flutter/website/pull/9872
This PR adds initial support for Swift Package Manager (SPM). Users must opt in. Only compatible with Xcode 15+.
Fixes https://github.com/flutter/flutter/issues/146369.
## Included Features
This PR includes the following features:
* Enabling SPM via config
`flutter config --enable-swift-package-manager`
* Disabling SPM via config (will disable for all projects)
`flutter config --no-enable-swift-package-manager`
* Disabling SPM via pubspec.yaml (will disable for the specific project)
```
flutter:
disable-swift-package-manager: true
```
* Migrating existing apps to add SPM integration if using a Flutter plugin with a Package.swift
* Generates a Swift Package (named `FlutterGeneratedPluginSwiftPackage`) that handles Flutter SPM-compatible plugin dependencies. Generated package is added to the Xcode project.
* Error parsing of common errors that may occur due to using CocoaPods and Swift Package Manager together
* Tool will print warnings when using all Swift Package plugins and encourage you to remove CocoaPods
This PR also converts `integration_test` and `integration_test_macos` plugins to be both Swift Packages and CocoaPod Pods.
## How it Works
The Flutter CLI will generate a Swift Package called `FlutterGeneratedPluginSwiftPackage`, which will have local dependencies on all Swift Package compatible Flutter plugins.
The `FlutterGeneratedPluginSwiftPackage` package will be added to the Xcode project via altering of the `project.pbxproj`.
In addition, a "Pre-action" script will be added via altering of the `Runner.xcscheme`. This script will invoke the flutter tool to copy the Flutter/FlutterMacOS framework to the `BUILT_PRODUCTS_DIR` directory before the build starts. This is needed because plugins need to be linked to the Flutter framework and fortunately Swift Package Manager automatically uses `BUILT_PRODUCTS_DIR` as a framework search path.
CocoaPods will continue to run and be used to support non-Swift Package compatible Flutter plugins.
## Not Included Features
It does not include the following (will be added in future PRs):
* Create plugin template
* Create app template
* Add-to-App integration
Refactor framework coverage tests in order to reduce testing logic in test.dart and allow for later implementing package:test onto the existing framework coverage tests
Part of https://github.com/flutter/flutter/issues/145482
Adds a generic type and pop result to popscope and its friend.
The use cases are to be able to capture the result when the pop is called.
migration guide: https://github.com/flutter/website/pull/9872
Reverts: flutter/flutter#146931
Initiated by: Hixie
Reason for reverting: more failures
Original PR Author: Hixie
Reviewed By: {reidbaker}
This change reverts the following previous change:
Fixes#137555.
This is an updated version of https://github.com/flutter/flutter/pull/146856, which was reverted in https://github.com/flutter/flutter/pull/146927. The first commit is identical to the original PR, and subsequent commits are the fixes to address failures detected in devicelab post-commit.
Move from `test.dart` into new `runner_utils.dart` file:
- shard calculation related methods + `shuffleSeed` logic
- env variable flag calculation
- runner wrapper methods `runDartTest` and `_runFromList`
Create web tests suite class containing:
- web long running tests
- runWebHtmlUnitTests
- runWebCanvasKitUnitTests
- runWebSkwasmUnitTests
- the associate helper methods with the above
[A previous PR](https://github.com/flutter/flutter/pull/144279) implemented `const` constructors in the `Remote` class, so I wanted to follow up and use those constructors in the appropriate places.
This pull request aims for improved readability, based on issue #146600.
```dart
// before
Set<Color> _distinctVisibleColors() {
final Set<Color> distinctVisibleColors = <Color>{};
if (top.style != BorderStyle.none) {
distinctVisibleColors.add(top.color);
}
if (right.style != BorderStyle.none) {
distinctVisibleColors.add(right.color);
}
if (bottom.style != BorderStyle.none) {
distinctVisibleColors.add(bottom.color);
}
if (left.style != BorderStyle.none) {
distinctVisibleColors.add(left.color);
}
return distinctVisibleColors;
}
// after
Set<Color> _distinctVisibleColors() {
return <Color>{
if (top.style != BorderStyle.none) top.color,
if (right.style != BorderStyle.none) right.color,
if (bottom.style != BorderStyle.none) bottom.color,
if (left.style != BorderStyle.none) left.color,
};
}
```
Most of the repo should be covered in this PR (aside from `flutter_tools/`, since there was a lot going on in there).
The interface for `ArgResults` from `package:args` has added new fields. Change the implementations of these in the conductor to extend `Fake` so that these aren't analyzer errors.
This broke the pub roll here: https://github.com/flutter/flutter/pull/146642#issuecomment-2050169629
1. Change chromium default branch from master (404) to main.
2. When I migrated the template to ARC is triggered a `-Wobjc-redundant-literal-use` error, so fix that. Engine PR is https://github.com/flutter/engine/pull/51981
3. Update to `FLUTTER_SHELL_PLATFORM_EMBEDDER_TEST_UTILS_KEY_CODES_G_H_` to match https://github.com/flutter/engine/pull/49006
This only updates the template and the script--I ran the script to validate it worked and built in the engine, but did not check in the actual generated key code changes (filed https://github.com/flutter/flutter/issues/146480 for that).
This adds support for adding the `--wasm` flag to `flutter run` and `flutter drive`
* Emits errors if you attempt to use the skwasm renderer without the `--wasm` flag
* Emits errors if you try to use `--wasm` when not using a web device
* Uses the skwasm renderer by default if you pass `--wasm` and no `--web-renderer`
Add `--ab-local-engine-only` flag to change A/B benchmark aggregate behavior to instead run the number of tasks specified with the local engine only, not the default engine. This is useful when you are trying to get average and noise results for a particular engine branch, without needing the default engine every time you change the engine.
Fixes https://github.com/flutter/flutter/issues/143770
Refactor verify codesigned tests in order to reduce testing logic in test.dart and allow for later implementing package:test onto the existing verify codesigned tests
Part of https://github.com/flutter/flutter/issues/145482
https://github.com/flutter/engine/pull/51229 blocked [the roll](https://github.com/flutter/flutter/pull/146522) and had to be reverted, which is a shame, but on the bright side it made it possible to point the framework at my removal pr, at the point of its merging the first time
This fixes all errors that are fixable in the framework that would have blocked the roll. There are some that aren't fixable here (they need to be fixed in the engine)*, so I'll fix those in the engine but unfortunately I can't pick up another version here to re-test until I try to roll again ð¢
*This category is: uses of plugins that in turn have a `registerWith`, that references the v1 embedding. The plan to fix these cases is to leave the interface that that method relies on around for now. See https://github.com/flutter/packages/pull/6494#issuecomment-2046010323 for details
Relands https://github.com/flutter/flutter/pull/146181.
Just 3 commits:
1. a revert of the revert
2. the fix described in https://github.com/flutter/flutter/pull/146181#issuecomment-2038238869
3. updating two postsubmit tests from Java 11 to 17, as that is required for this new AGP version.
I've verified that `flutter build apk --flavor paid --debug` fails in `dev/integration_tests/flavors/` with the error in ci without (2), and succeeds with it.
I've also verified that the `dev/benchmarks/complex_layout` app builds successfully with Java 17.
That covers all the postsubmits that failed according [to the dashboard](https://flutter-dashboard.appspot.com/#/build).
Reverts: flutter/flutter#146181
Initiated by: LongCatIsLooong
Reason for reverting: https://ci.chromium.org/ui/p/flutter/builders/prod/Windows_android%20flavors_test_win/11086/overview
Original PR Author: gmackall
Reviewed By: {reidbaker, christopherfujino}
This change reverts the following previous change:
Bump almost all tests to AGP 8.1 and Gradle 8.3
Flutter gallery is excluded, because it uses discontinued plugins that in turn use old Gradle versions, and that prevents upgrading. Will take some extra work to figure out what to do there.
Should bump templates next
Entire PR generated with the lockfile generation script, except for:
1. changes within `dev/integration_tests/gradle_deprecated_settings/android/`, which must be done manually (and exclusion of the gallery for reason mentioned above).
2. Changes to many `AndroidManifest.xml` files to remove the `package` attribute and instead set that same value in the `build.gradle`, in the `namespace` attribute of the `android` closure (corresponds to an AGP behavior change, see https://d.android.com/r/tools/upgrade-assistant/set-namespace).
3. Removes the use of the `battery` plugin in `android_embedding_v2_smoke_test` because the plugin is discontinued, unused, and blocks upgrading the AGP version for that app because the discontinued plugin itself uses a very old AGP version.
Bump almost all tests to AGP 8.1 and Gradle 8.3
Flutter gallery is excluded, because it uses discontinued plugins that in turn use old Gradle versions, and that prevents upgrading. Will take some extra work to figure out what to do there.
Should bump templates next
Entire PR generated with the lockfile generation script, except for:
1. changes within `dev/integration_tests/gradle_deprecated_settings/android/`, which must be done manually (and exclusion of the gallery for reason mentioned above).
2. Changes to many `AndroidManifest.xml` files to remove the `package` attribute and instead set that same value in the `build.gradle`, in the `namespace` attribute of the `android` closure (corresponds to an AGP behavior change, see https://d.android.com/r/tools/upgrade-assistant/set-namespace).
3. Removes the use of the `battery` plugin in `android_embedding_v2_smoke_test` because the plugin is discontinued, unused, and blocks upgrading the AGP version for that app because the discontinued plugin itself uses a very old AGP version.