Commit 069d31d0 authored by P.Y. Laligand's avatar P.Y. Laligand Committed by GitHub

Add manifest argument for building apps on Fuchsia. (#7004)

parent 7a10db25
...@@ -19,7 +19,8 @@ const String _kOptionOutput = 'output-file'; ...@@ -19,7 +19,8 @@ const String _kOptionOutput = 'output-file';
const String _kOptionHeader = 'header'; const String _kOptionHeader = 'header';
const String _kOptionSnapshot = 'snapshot'; const String _kOptionSnapshot = 'snapshot';
const String _kOptionWorking = 'working-dir'; const String _kOptionWorking = 'working-dir';
const List<String> _kOptions = const <String>[ const String _kOptionsManifest = 'manifest';
const List<String> _kRequiredOptions = const <String>[
_kOptionPackages, _kOptionPackages,
_kOptionOutput, _kOptionOutput,
_kOptionHeader, _kOptionHeader,
...@@ -35,9 +36,10 @@ Future<Null> main(List<String> args) async { ...@@ -35,9 +36,10 @@ Future<Null> main(List<String> args) async {
..addOption(_kOptionHeader, help: 'The header of the flx file') ..addOption(_kOptionHeader, help: 'The header of the flx file')
..addOption(_kOptionSnapshot, help: 'The generated snapshot file') ..addOption(_kOptionSnapshot, help: 'The generated snapshot file')
..addOption(_kOptionWorking, ..addOption(_kOptionWorking,
help: 'The directory where to put temporary files'); help: 'The directory where to put temporary files')
..addOption(_kOptionsManifest, help: 'The manifest file');
final ArgResults argResults = parser.parse(args); final ArgResults argResults = parser.parse(args);
if (_kOptions.any((String option) => !argResults.options.contains(option))) { if (_kRequiredOptions.any((String option) => !argResults.options.contains(option))) {
printError('Missing option! All options must be specified.'); printError('Missing option! All options must be specified.');
exit(1); exit(1);
} }
...@@ -49,7 +51,7 @@ Future<Null> main(List<String> args) async { ...@@ -49,7 +51,7 @@ Future<Null> main(List<String> args) async {
snapshotFile: new File(argResults[_kOptionSnapshot]), snapshotFile: new File(argResults[_kOptionSnapshot]),
workingDirPath: argResults[_kOptionWorking], workingDirPath: argResults[_kOptionWorking],
packagesPath: argResults[_kOptionPackages], packagesPath: argResults[_kOptionPackages],
manifestPath: defaultManifestPath, manifestPath: argResults[_kOptionsManifest] ?? defaultManifestPath,
includeDefaultFonts: false, includeDefaultFonts: false,
); );
} on ToolExit catch (e) { } on ToolExit catch (e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment