flutter/packages/flutter_tools/lib/src/commands
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
..
analyze_base.dart Remove dubious comment (#150608) 2024-06-25 09:46:28 +02:00
analyze_continuously.dart
analyze_once.dart
analyze.dart Android analyze command should run pub (#153953) 2024-08-23 17:57:07 +00:00
android_analyze.dart Improves output file path logic in Android analyze (#136981) 2023-11-16 22:59:02 +00:00
assemble.dart Reland1: "Revert "Add and plumb useImplicitPubspecResolution across flutter_tools."" (#158126) 2024-11-05 08:49:42 -08:00
attach.dart Reland1: "Revert "Add and plumb useImplicitPubspecResolution across flutter_tools."" (#158126) 2024-11-05 08:49:42 -08:00
build_aar.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
build_apk.dart [tool][android] Allow --target-platform work properly with --debug mode (#154476) 2024-10-01 15:24:53 +00:00
build_appbundle.dart Refactor BuildInfo to always require packageConfigPath (#150559) 2024-07-02 11:19:31 +02:00
build_bundle.dart Reland1: "Revert "Add and plumb useImplicitPubspecResolution across flutter_tools."" (#158126) 2024-11-05 08:49:42 -08:00
build_ios_framework.dart Reland1: "Revert "Add and plumb useImplicitPubspecResolution across flutter_tools."" (#158126) 2024-11-05 08:49:42 -08:00
build_ios.dart Fix flutter build ipa --export-method not accepting enterprise flag (#153047) 2024-08-08 16:07:27 +00:00
build_linux.dart [tool] Remove some usages of deprecated usage package (#151359) 2024-07-09 18:17:21 +00:00
build_macos_framework.dart Reland1: "Revert "Add and plumb useImplicitPubspecResolution across flutter_tools."" (#158126) 2024-11-05 08:49:42 -08:00
build_macos.dart [tool] Remove some usages of deprecated usage package (#151359) 2024-07-09 18:17:21 +00:00
build_preview.dart Reland "Load parent package config" (#153754) 2024-08-20 15:30:46 +02:00
build_web.dart Reland1: "Revert "Add and plumb useImplicitPubspecResolution across flutter_tools."" (#158126) 2024-11-05 08:49:42 -08:00
build_windows.dart [tool] Remove some usages of deprecated usage package (#151359) 2024-07-09 18:17:21 +00:00
build.dart Enable native compilation for windows-arm64 (#141930) 2024-01-26 00:08:20 +00:00
channel.dart Tighten up throwToolExit, explain when to use it. (#157561) 2024-10-26 03:17:24 +00:00
clean.dart Reland "Load parent package config" (#153754) 2024-08-20 15:30:46 +02:00
config.dart Opt out users from GA3 if opted out of GA4 (#146453) 2024-04-19 01:03:15 +00:00
create_base.dart Reland1: "Revert "Add and plumb useImplicitPubspecResolution across flutter_tools."" (#158126) 2024-11-05 08:49:42 -08:00
create.dart Plugin.isDevDependency if exclusively in dev_dependencies (#157462) 2024-11-07 18:09:22 +00:00
custom_devices.dart Reland1: "Revert "Add and plumb useImplicitPubspecResolution across flutter_tools."" (#158126) 2024-11-05 08:49:42 -08:00
daemon.dart Reland1: "Revert "Add and plumb useImplicitPubspecResolution across flutter_tools."" (#158126) 2024-11-05 08:49:42 -08:00
debug_adapter.dart
devices.dart Device discovery output cleanup (#131223) 2023-07-28 21:37:00 +00:00
doctor.dart
downgrade.dart Improve 'flutter downgrade' error message (#154434) 2024-09-04 22:06:31 +00:00
drive.dart Reland1: "Revert "Add and plumb useImplicitPubspecResolution across flutter_tools."" (#158126) 2024-11-05 08:49:42 -08:00
emulators.dart
generate_localizations.dart Reland2: Revert "Revert "Add a warning/additional handlers for parsingsynthetic-package."" (#158184) 2024-11-05 09:42:57 -08:00
generate.dart
ide_config.dart
install.dart
ios_analyze.dart Makes scheme and target optional parameter when getting universal lin… (#134571) 2023-09-15 21:01:05 +00:00
logs.dart [flutter_tools] Fix bad state future already completed in flutter logs (#138517) 2023-11-23 19:56:14 +00:00
make_host_app_editable.dart
packages.dart Plugin.isDevDependency if exclusively in dev_dependencies (#157462) 2024-11-07 18:09:22 +00:00
precache.dart
run.dart Reland1: "Revert "Add and plumb useImplicitPubspecResolution across flutter_tools."" (#158126) 2024-11-05 08:49:42 -08:00
screenshot.dart Enable flutter screenshot outside Flutter project directory (#138160) 2023-11-17 01:08:13 +00:00
shell_completion.dart
symbolize.dart Extend 'flutter symbolize' to handle deferred loading units. (#149315) 2024-09-16 17:55:05 +00:00
test.dart [tool] Emit a deprecation warning for some values of --web-renderer. (#156376) 2024-10-08 01:39:06 +00:00
update_packages.dart Do not silently fail pub get even if output-mode is "none" (#153596) 2024-08-22 09:12:54 -07:00
upgrade.dart Switch to more reliable flutter.dev link destinations in the tool (#150587) 2024-06-26 23:30:39 +00:00
validate_project.dart Implementing switch expressions in flutter_tools/ (#145632) 2024-03-29 22:31:19 +00:00