flutter/packages/flutter_tools/test/general.shard/runner
Matan Lurey 78cfc1ae9b
Plugin.isDevDependency if exclusively in dev_dependencies (#157462)
Work towards https://github.com/flutter/flutter/issues/56591.

I explicitly want an LGTM from @andrewkolos @jmagman @jonahwilliams before merging.

---

After this PR, `<Plugin>.isDevDependency` is resolved based on the following logic, IFF:

- The plugin comes from a package _A_ listed in the app's package's `dev_dependencies: ...`
- The package _A_ is not a normal dependency of any transitive non-dev dependency of the app

See [`compute_dev_dependencies_test.dart`](51676093a3/packages/flutter_tools/test/general.shard/compute_dev_dependencies_test.dart) for probably the best specification of this behavior.

We (still) do not write the property to disk (i.e. it never makes it to `.flutter-plugins-dependencies`), so there is no impact to build artifacts at this time; that would come in a follow-up PR (and then follow-up follow-up PRs for the various build systems in both Gradle and Xcode to actually use that value to omit dependencies).

Some tests had to be updated; for the most part it was updating the default `ProcessManager` because a call to `dart pub deps --json` is now made in code that computes what plugins are available, but there should be no change in behavior.

_/cc @jonasfj @sigurdm for FYI only (we talked on an internal thread about this; see https://github.com/dart-lang/sdk/issues/56968)._

_/cc @camsim99 @cbracken @johnmccutchan for visibility on the change._
2024-11-07 18:09:22 +00:00
..
flutter_command_runner_test.dart Stop reading .packages from flutter_tools. (#154912) 2024-09-13 13:53:05 +02:00
flutter_command_test.dart Plugin.isDevDependency if exclusively in dev_dependencies (#157462) 2024-11-07 18:09:22 +00:00
local_engine_test.dart Stop reading .packages from flutter_tools. (#154912) 2024-09-13 13:53:05 +02:00
runner_test.dart Handle ProcessExceptions due to git missing on the host (#154445) 2024-09-09 20:47:05 +00:00
target_devices_test.dart Updated iPhone enable developer mode instructions (#154511) 2024-10-12 06:23:13 +00:00
utils.dart Migrate some test files to null safety (#104469) 2022-05-24 16:53:08 -07:00