Allow opting out of .flutter-plugins, opt-out in refreshPluginsList. (#157527)

Work towards https://github.com/flutter/flutter/issues/48918.

Workaround for https://github.com/flutter/flutter/issues/157391 (see https://github.com/flutter/flutter/pull/157393#issuecomment-2434336047).

I'll run all post-submit tasks as well on this PR using `test: all`.
This commit is contained in:
Matan Lurey
2024-10-24 13:01:45 -07:00
committed by GitHub
parent 73f66a7ea4
commit dc13c3bfb7
3 changed files with 24 additions and 3 deletions

View File

@@ -448,6 +448,20 @@ dependencies:
ProcessManager: () => FakeProcessManager.any(),
});
testUsingContext('Opting out of writeLegacyPluginsList omits .flutter-plugins', () async {
createFakePlugins(fs, <String>[
'plugin_d',
'plugin_a',
'/local_plugins/plugin_c',
'/local_plugins/plugin_b',
]);
await refreshPluginsList(flutterProject, writeLegacyPluginsList: false);
expect(flutterProject.flutterPluginsFile, isNot(exists));
expect(flutterProject.flutterPluginsDependenciesFile, exists);
});
testUsingContext(
'Refreshing the plugin list modifies .flutter-plugins '
'and .flutter-plugins-dependencies when there are plugins', () async {