Use async execution for xcodebuild commands (#29048)

This commit is contained in:
Priit Lätt 2019-03-19 18:19:34 +02:00 committed by Jonah Williams
parent 2b7ad97419
commit cdbd0f9ddd
3 changed files with 5 additions and 5 deletions

View File

@ -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:');

View File

@ -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());
}
}

View File

@ -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'],