flutter/packages/flutter_tools/test/general.shard/build_system
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
..
targets Plugin.isDevDependency if exclusively in dev_dependencies (#157462) 2024-11-07 18:09:22 +00:00
build_system_test.dart Dual compile reland (#143262) 2024-02-13 20:02:10 +00:00
depfile_test.dart Fix typos (#121171) 2023-02-23 19:43:21 +00:00
exceptions_test.dart Remove globals_null_migrated.dart, move into globals.dart (#92861) 2021-11-01 17:18:03 -07:00
file_store_test.dart Cast config values to dynamic values instead of Object (#80011) 2021-04-08 15:18:28 -07:00
hash_test.dart Convert some general.shard base tests to null safety (#79985) 2021-04-08 14:55:19 -07:00
invalidated_reason_test.dart Migrate some flutter_tools tests to null safety (#88850) 2021-08-25 16:21:04 -07:00
source_test.dart [flutter_tools] migrate more unit tests to null safety (#106153) 2022-06-17 21:34:27 -07:00