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({
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')) {
printError('The Xcode project does not define target "Runner" which is needed by Flutter tooling.');
printError('Open Xcode to fix the problem:');
......
......@@ -161,11 +161,11 @@ class XcodeProjectInterpreter {
return parseXcodeBuildSettings(out);
}
XcodeProjectInfo getInfo(String projectPath) {
final String out = runCheckedSync(<String>[
Future<XcodeProjectInfo> getInfo(String projectPath) async {
final RunResult result = await runCheckedAsync(<String>[
_executable, '-list',
], workingDirectory: projectPath);
return XcodeProjectInfo.fromXcodeBuildOutput(out);
return XcodeProjectInfo.fromXcodeBuildOutput(result.toString());
}
}
......
......@@ -294,7 +294,7 @@ class MockXcodeProjectInterpreter implements XcodeProjectInterpreter {
}
@override
XcodeProjectInfo getInfo(String projectPath) {
Future<XcodeProjectInfo> getInfo(String projectPath) async {
return XcodeProjectInfo(
<String>['Runner'],
<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