mirror of
https://github.com/flutter/flutter
synced 2024-10-13 03:32:55 +00:00
Don't link the core snapshot in the Android engine. (#17855)
Allows one to use a different core snapshot without a custom engine build by just packaging a different one in the APK.
This commit is contained in:
parent
bf0f4e6b2e
commit
d27cd520de
|
@ -1 +1 @@
|
|||
8f7a59b529d9397970770a29b9dfe042c12ddc54
|
||||
86d96fd0ce8d58d2dfcd4398eb97aa66873d3bf7
|
||||
|
|
|
@ -25,6 +25,8 @@ const String defaultPrivateKeyPath = 'privatekey.der';
|
|||
|
||||
const String _kKernelKey = 'kernel_blob.bin';
|
||||
const String _kSnapshotKey = 'snapshot_blob.bin';
|
||||
const String _kVMSnapshotData = 'vm_snapshot_data';
|
||||
const String _kIsolateSnapshotData = 'isolate_snapshot_data';
|
||||
const String _kDylibKey = 'libapp.so';
|
||||
const String _kPlatformKernelKey = 'platform.dill';
|
||||
|
||||
|
@ -150,14 +152,21 @@ Future<void> assemble({
|
|||
printTrace('Building bundle');
|
||||
|
||||
final Map<String, DevFSContent> assetEntries = new Map<String, DevFSContent>.from(assetBundle.entries);
|
||||
final String vmSnapshotData = artifacts.getArtifactPath(Artifact.vmSnapshotData);
|
||||
final String isolateSnapshotData = artifacts.getArtifactPath(Artifact.isolateSnapshotData);
|
||||
|
||||
if (kernelContent != null) {
|
||||
final String platformKernelDill = artifacts.getArtifactPath(Artifact.platformKernelDill);
|
||||
assetEntries[_kKernelKey] = kernelContent;
|
||||
assetEntries[_kPlatformKernelKey] = new DevFSFileContent(fs.file(platformKernelDill));
|
||||
assetEntries[_kVMSnapshotData] = new DevFSFileContent(fs.file(vmSnapshotData));
|
||||
assetEntries[_kIsolateSnapshotData] = new DevFSFileContent(fs.file(isolateSnapshotData));
|
||||
}
|
||||
if (snapshotFile != null)
|
||||
if (snapshotFile != null) {
|
||||
assetEntries[_kSnapshotKey] = new DevFSFileContent(snapshotFile);
|
||||
assetEntries[_kVMSnapshotData] = new DevFSFileContent(fs.file(vmSnapshotData));
|
||||
assetEntries[_kIsolateSnapshotData] = new DevFSFileContent(fs.file(isolateSnapshotData));
|
||||
}
|
||||
if (dylibFile != null)
|
||||
assetEntries[_kDylibKey] = new DevFSFileContent(dylibFile);
|
||||
|
||||
|
|
Loading…
Reference in a new issue