Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure unpack declares required artifacts #33454

Merged
merged 2 commits into from May 29, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions packages/flutter_tools/lib/src/commands/unpack.dart
Expand Up @@ -72,6 +72,27 @@ class UnpackCommand extends FlutterCommand {
@override
bool get isExperimental => true;

@override
Future<Set<DevelopmentArtifact>> get requiredArtifacts async {
final Set<DevelopmentArtifact> result = <DevelopmentArtifact>{
DevelopmentArtifact.universal,
};
final TargetPlatform targetPlatform = getTargetPlatformForName(argResults['target-platform']);
switch (targetPlatform) {
case TargetPlatform.darwin_x64:
result.add(DevelopmentArtifact.macOS);
break;
case TargetPlatform.windows_x64:
result.add(DevelopmentArtifact.windows);
break;
case TargetPlatform.linux_x64:
result.add(DevelopmentArtifact.linux);
break;
default:
}
return result;
}

@override
Future<FlutterCommandResult> runCommand() async {
final String targetName = argResults['target-platform'];
Expand Down