mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Use async execution for xcodebuild commands (#29048)
This commit is contained in:
parent
2b7ad97419
commit
cdbd0f9ddd
@ -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'],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user