Show Xcode workspace clean output with verbose flag (#52860)
diff --git a/packages/flutter_tools/lib/src/commands/clean.dart b/packages/flutter_tools/lib/src/commands/clean.dart index 6c23d45..fa2734a 100644 --- a/packages/flutter_tools/lib/src/commands/clean.dart +++ b/packages/flutter_tools/lib/src/commands/clean.dart
@@ -15,10 +15,14 @@ import '../runner/flutter_command.dart'; class CleanCommand extends FlutterCommand { - CleanCommand() { + CleanCommand({ + bool verbose = false, + }) : _verbose = verbose { requiresPubspecYaml(); } + final bool _verbose; + @override final String name = 'clean'; @@ -69,7 +73,7 @@ final Directory xcodeWorkspace = xcodeProject.xcodeWorkspace; final XcodeProjectInfo projectInfo = await globals.xcodeProjectInterpreter.getInfo(xcodeWorkspace.parent.path); for (final String scheme in projectInfo.schemes) { - await globals.xcodeProjectInterpreter.cleanWorkspace(xcodeWorkspace.path, scheme); + await globals.xcodeProjectInterpreter.cleanWorkspace(xcodeWorkspace.path, scheme, verbose: _verbose); } } on Exception catch (error) { globals.printTrace('Could not clean Xcode workspace: $error');
diff --git a/packages/flutter_tools/lib/src/ios/xcodeproj.dart b/packages/flutter_tools/lib/src/ios/xcodeproj.dart index 0c8b643..09081ec 100644 --- a/packages/flutter_tools/lib/src/ios/xcodeproj.dart +++ b/packages/flutter_tools/lib/src/ios/xcodeproj.dart
@@ -364,14 +364,15 @@ } } - Future<void> cleanWorkspace(String workspacePath, String scheme) async { + Future<void> cleanWorkspace(String workspacePath, String scheme, { bool verbose = false }) async { await _processUtils.run(<String>[ _executable, '-workspace', workspacePath, '-scheme', scheme, - '-quiet', + if (!verbose) + '-quiet', 'clean', ...environmentVariablesAsXcodeBuildSettings(_platform) ], workingDirectory: _fileSystem.currentDirectory.path);