diff --git a/packages/flutter_tools/bin/fuchsia_builder.dart b/packages/flutter_tools/bin/fuchsia_builder.dart index ccebe47b25f..c85477660b9 100644 --- a/packages/flutter_tools/bin/fuchsia_builder.dart +++ b/packages/flutter_tools/bin/fuchsia_builder.dart @@ -13,35 +13,26 @@ import '../lib/src/cache.dart'; import '../lib/src/flx.dart'; import '../lib/src/globals.dart'; -const String _kOptionSnapshotter = 'snapshotter-path'; -const String _kOptionTarget = 'target'; const String _kOptionPackages = 'packages'; const String _kOptionOutput = 'output-file'; const String _kOptionHeader = 'header'; const String _kOptionSnapshot = 'snapshot'; -const String _kOptionDepfile = 'depfile'; const String _kOptionWorking = 'working-dir'; const List _kOptions = const [ - _kOptionSnapshotter, - _kOptionTarget, _kOptionPackages, _kOptionOutput, _kOptionHeader, _kOptionSnapshot, - _kOptionDepfile, _kOptionWorking, ]; Future main(List args) async { context[Logger] = new StdoutLogger(); final ArgParser parser = new ArgParser() - ..addOption(_kOptionSnapshotter, help: 'The snapshotter executable') - ..addOption(_kOptionTarget, help: 'The entry point into the app') ..addOption(_kOptionPackages, help: 'The .packages file') ..addOption(_kOptionOutput, help: 'The generated flx file') ..addOption(_kOptionHeader, help: 'The header of the flx file') ..addOption(_kOptionSnapshot, help: 'The generated snapshot file') - ..addOption(_kOptionDepfile, help: 'The generated dependency file') ..addOption(_kOptionWorking, help: 'The directory where to put temporary files'); final ArgResults argResults = parser.parse(args); @@ -52,13 +43,11 @@ Future main(List args) async { Cache.flutterRoot = Platform.environment['FLUTTER_ROOT']; String outputPath = argResults[_kOptionOutput]; final int buildResult = await build( - snapshotterPath: argResults[_kOptionSnapshotter], - mainPath: argResults[_kOptionTarget], outputPath: outputPath, snapshotPath: argResults[_kOptionSnapshot], - depfilePath: argResults[_kOptionDepfile], workingDirPath: argResults[_kOptionWorking], packagesPath: argResults[_kOptionPackages], + precompiledSnapshot: true, includeRobotoFonts: true, ); if (buildResult != 0) { diff --git a/packages/flutter_tools/lib/src/flx.dart b/packages/flutter_tools/lib/src/flx.dart index b0ced7bac53..dafbcff13c1 100644 --- a/packages/flutter_tools/lib/src/flx.dart +++ b/packages/flutter_tools/lib/src/flx.dart @@ -90,7 +90,6 @@ Future build({ depfilePath ??= defaultDepfilePath; workingDirPath ??= getAssetBuildDirectory(); packagesPath ??= path.absolute(PackageMap.globalPackagesPath); - File snapshotFile; if (!precompiledSnapshot) { ensureDirectoryExists(snapshotPath); @@ -108,10 +107,10 @@ Future build({ printError('Failed to run the Flutter compiler. Exit code: $result'); return result; } - - snapshotFile = new File(snapshotPath); } + File snapshotFile = new File(snapshotPath); + return assemble( manifestPath: manifestPath, snapshotFile: snapshotFile,