Commit cdbd0f9d authored by Priit Lätt's avatar Priit Lätt Committed by Jonah Williams

Use async execution for xcodebuild commands (#29048)

parent 2b7ad974
...@@ -311,7 +311,7 @@ Future<XcodeBuildResult> buildXcodeProject({ ...@@ -311,7 +311,7 @@ Future<XcodeBuildResult> buildXcodeProject({
modern: false, modern: false,
); );
final XcodeProjectInfo projectInfo = xcodeProjectInterpreter.getInfo(app.project.hostAppRoot.path); final XcodeProjectInfo projectInfo = await xcodeProjectInterpreter.getInfo(app.project.hostAppRoot.path);
if (!projectInfo.targets.contains('Runner')) { if (!projectInfo.targets.contains('Runner')) {
printError('The Xcode project does not define target "Runner" which is needed by Flutter tooling.'); printError('The Xcode project does not define target "Runner" which is needed by Flutter tooling.');
printError('Open Xcode to fix the problem:'); printError('Open Xcode to fix the problem:');
......
...@@ -161,11 +161,11 @@ class XcodeProjectInterpreter { ...@@ -161,11 +161,11 @@ class XcodeProjectInterpreter {
return parseXcodeBuildSettings(out); return parseXcodeBuildSettings(out);
} }
XcodeProjectInfo getInfo(String projectPath) { Future<XcodeProjectInfo> getInfo(String projectPath) async {
final String out = runCheckedSync(<String>[ final RunResult result = await runCheckedAsync(<String>[
_executable, '-list', _executable, '-list',
], workingDirectory: projectPath); ], workingDirectory: projectPath);
return XcodeProjectInfo.fromXcodeBuildOutput(out); return XcodeProjectInfo.fromXcodeBuildOutput(result.toString());
} }
} }
......
...@@ -294,7 +294,7 @@ class MockXcodeProjectInterpreter implements XcodeProjectInterpreter { ...@@ -294,7 +294,7 @@ class MockXcodeProjectInterpreter implements XcodeProjectInterpreter {
} }
@override @override
XcodeProjectInfo getInfo(String projectPath) { Future<XcodeProjectInfo> getInfo(String projectPath) async {
return XcodeProjectInfo( return XcodeProjectInfo(
<String>['Runner'], <String>['Runner'],
<String>['Debug', 'Release'], <String>['Debug', 'Release'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment