flutter/packages/flutter_tools/lib
Andrew Kolos 8e4f704abc
[CLI tool] in flutter test, consider --flavor when validating the cached asset bundle (#150461)
Fixes https://github.com/flutter/flutter/issues/150296

**Context.** `flutter test` has its own code path for writing flutter app [assets](https://docs.flutter.dev/ui/assets/assets-and-images). https://github.com/flutter/flutter/pull/132985 introduced [flavor-conditional asset bundling ](https://docs.flutter.dev/deployment/flavors#conditionally-bundling-assets-based-on-flavor), which lets users control which assets get bundled based on `--flavor`. `--flavor` is supported in `flutter test`.

**Bug and fix.** `--flavor` isn't considered when deciding whether we need to rebuild this asset bundle:

5e448f4ce5/packages/flutter_tools/lib/src/commands/test.dart (L709)

This PR address this by writing the value of `--flavor` to a file in the build directory and checking that when validating the cached asset bundle.
2024-06-20 17:45:09 +00:00
..
src [CLI tool] in flutter test, consider --flavor when validating the cached asset bundle (#150461) 2024-06-20 17:45:09 +00:00
executable.dart Disable single character mode in the terminal when exiting flutter_tools (#146534) 2024-04-10 23:54:42 +00:00
runner.dart Swap crash reporting with unified analytics (#148525) 2024-05-18 01:30:13 +00:00