Add --use-application-binary to "flutter install" (#101324)

This commit is contained in:
Jenn Magder
2022-04-06 13:17:26 -07:00
committed by GitHub
parent d08f7ab9c9
commit d745eec051
6 changed files with 76 additions and 16 deletions

View File

@@ -117,6 +117,7 @@ class FlutterOptions {
static const String kInitializeFromDill = 'initialize-from-dill';
static const String kAssumeInitializeFromDillUpToDate = 'assume-initialize-from-dill-up-to-date';
static const String kFatalWarnings = 'fatal-warnings';
static const String kUseApplicationBinary = 'use-application-binary';
}
/// flutter command categories for usage.
@@ -606,6 +607,16 @@ abstract class FlutterCommand extends Command<void> {
);
}
void usesApplicationBinaryOption() {
argParser.addOption(
FlutterOptions.kUseApplicationBinary,
help: 'Specify a pre-built application binary to use when running. For Android applications, '
'this must be the path to an APK. For iOS applications, the path to an IPA. Other device types '
'do not yet support prebuilt application binaries.',
valueHelp: 'path/to/app.apk',
);
}
/// Whether it is safe for this command to use a cached pub invocation.
bool get cachePubGet => true;