Allow overriding the native assets yaml file in the resident runner. (#142016)

This is used when the native assets are built by a separate build system.

Context: b/286799303
This commit is contained in:
Lau Ching Jun
2024-01-23 11:49:10 -08:00
committed by GitHub
parent f04958a11b
commit f52eaaea08
6 changed files with 105 additions and 14 deletions

View File

@@ -150,6 +150,7 @@ abstract final class FlutterOptions {
static const String kAndroidProjectArgs = 'android-project-arg';
static const String kInitializeFromDill = 'initialize-from-dill';
static const String kAssumeInitializeFromDillUpToDate = 'assume-initialize-from-dill-up-to-date';
static const String kNativeAssetsYamlFile = 'native-assets-yaml-file';
static const String kFatalWarnings = 'fatal-warnings';
static const String kUseApplicationBinary = 'use-application-binary';
static const String kWebBrowserFlag = 'web-browser-flag';
@@ -1007,6 +1008,14 @@ abstract class FlutterCommand extends Command<void> {
);
}
void usesNativeAssetsOption({ required bool hide }) {
argParser.addOption(FlutterOptions.kNativeAssetsYamlFile,
help: 'Initializes the resident compiler with a custom native assets '
'yaml file instead of the default cached location.',
hide: hide,
);
}
void addMultidexOption({ bool hide = false }) {
argParser.addFlag('multidex',
defaultsTo: true,