Commit 984b6239 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Fix builds of FLX bundles using AOT compilation (#6684)

parent d86900d2
...@@ -42,12 +42,12 @@ Future<Null> main(List<String> args) async { ...@@ -42,12 +42,12 @@ Future<Null> main(List<String> args) async {
} }
Cache.flutterRoot = Platform.environment['FLUTTER_ROOT']; Cache.flutterRoot = Platform.environment['FLUTTER_ROOT'];
String outputPath = argResults[_kOptionOutput]; String outputPath = argResults[_kOptionOutput];
final int buildResult = await build( final int buildResult = await assemble(
outputPath: outputPath, outputPath: outputPath,
snapshotPath: argResults[_kOptionSnapshot], snapshotFile: new File(argResults[_kOptionSnapshot]),
workingDirPath: argResults[_kOptionWorking], workingDirPath: argResults[_kOptionWorking],
packagesPath: argResults[_kOptionPackages], packagesPath: argResults[_kOptionPackages],
precompiledSnapshot: true, manifestPath: defaultManifestPath,
includeRobotoFonts: true, includeRobotoFonts: true,
); );
if (buildResult != 0) { if (buildResult != 0) {
......
...@@ -90,6 +90,7 @@ Future<int> build({ ...@@ -90,6 +90,7 @@ Future<int> build({
depfilePath ??= defaultDepfilePath; depfilePath ??= defaultDepfilePath;
workingDirPath ??= getAssetBuildDirectory(); workingDirPath ??= getAssetBuildDirectory();
packagesPath ??= path.absolute(PackageMap.globalPackagesPath); packagesPath ??= path.absolute(PackageMap.globalPackagesPath);
File snapshotFile;
if (!precompiledSnapshot) { if (!precompiledSnapshot) {
ensureDirectoryExists(snapshotPath); ensureDirectoryExists(snapshotPath);
...@@ -107,9 +108,9 @@ Future<int> build({ ...@@ -107,9 +108,9 @@ Future<int> build({
printError('Failed to run the Flutter compiler. Exit code: $result'); printError('Failed to run the Flutter compiler. Exit code: $result');
return result; return result;
} }
}
File snapshotFile = new File(snapshotPath); snapshotFile = new File(snapshotPath);
}
return assemble( return assemble(
manifestPath: manifestPath, manifestPath: manifestPath,
......
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