Improve performance of build APK (~50%) by running gen_snapshot concurrently (#44534)
This commit is contained in:
@@ -111,8 +111,8 @@ Future<void> main() async {
|
||||
// When the platform-target isn't specified, we generate the snapshots
|
||||
// for arm and arm64.
|
||||
final List<String> targetPlatforms = <String>[
|
||||
'android-arm',
|
||||
'android-arm64',
|
||||
'arm64-v8a',
|
||||
'armeabi-v7a',
|
||||
];
|
||||
for (final String targetPlatform in targetPlatforms) {
|
||||
final String androidArmSnapshotPath = path.join(
|
||||
|
||||
@@ -216,12 +216,12 @@ Future<void> main() async {
|
||||
}
|
||||
|
||||
final String analyticsOutput = analyticsOutputFile.readAsStringSync();
|
||||
if (!analyticsOutput.contains('cd24: android-arm64')
|
||||
if (!analyticsOutput.contains('cd24: android')
|
||||
|| !analyticsOutput.contains('cd25: true')
|
||||
|| !analyticsOutput.contains('viewName: assemble')) {
|
||||
return TaskResult.failure(
|
||||
'Building outer app produced the following analytics: "$analyticsOutput"'
|
||||
'but not the expected strings: "cd24: android-arm64", "cd25: true" and '
|
||||
'but not the expected strings: "cd24: android", "cd25: true" and '
|
||||
'"viewName: assemble"'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ Future<ProcessResult> _resultOfGradleTask({String workingDirectory, String task,
|
||||
String validateSnapshotDependency(FlutterProject project, String expectedTarget) {
|
||||
final File snapshotBlob = File(
|
||||
path.join(project.rootPath, 'build', 'app', 'intermediates',
|
||||
'flutter', 'debug', 'android-arm', 'flutter_build.d'));
|
||||
'flutter', 'debug', 'flutter_build.d'));
|
||||
|
||||
assert(snapshotBlob.existsSync());
|
||||
final String contentSnapshot = snapshotBlob.readAsStringSync();
|
||||
|
||||
Reference in New Issue
Block a user