flutter/packages/flutter_tools/test/commands.shard
Matan Lurey a6a8caaa73
Read AndroidManifest.xml and emit manifest-impeller-(enabled|disabled) analytics (#150791)
Work towards https://github.com/flutter/flutter/issues/132712.

After this PR, after a completed `flutter build apk` command, we:

- Emit a `manifest-impeller-disabled` command if `io.flutter.embedding.android.EnableImpeller` is `'false'`.
- Emit a `manifest-impeller-disabled` command if `io.flutter.embedding.android.EnableImpeller` is _missing_.
- Emit a `manifest-impeller-enabled` command if `io.flutter.embedding.android.EnableImpeller` is `'true'`.

We will need to change the default (see `_impellerEnabledByDefault` in `project.dart`) before releasing, otherwise we will misreport `manifest-impeller-disabled` at a much higher rate than actual. If there is a way to instead compute the default instead of hard-coding, that would have been good.

See <https://docs.flutter.dev/perf/impeller#android> for details on the key-value pair.

---

I also did a tad of TLC, by removing the (now-defunct) `Usage` events for `flutter build ios`, so they are consistent.

/cc @zanderso, @chinmaygarde, @jonahwilliams
2024-06-25 22:41:23 +00:00
..
hermetic Read AndroidManifest.xml and emit manifest-impeller-(enabled|disabled) analytics (#150791) 2024-06-25 22:41:23 +00:00
permeable Read AndroidManifest.xml and emit manifest-impeller-(enabled|disabled) analytics (#150791) 2024-06-25 22:41:23 +00:00
README.md

This directory contains tests for specific flutter commands.

Tests that are self-contained unit tests should go in hermetic/.

Tests that are more end-to-end, e.g. that involve actually running subprocesses, should go in permeable/.

The ../../tool/coverage_tool.dart script (which is used to collect coverage for the tool) runs only the tests in the hermetic directory when collecting coverage.