Unverified Commit 570ae840 authored by Stanislav Baranov's avatar Stanislav Baranov Committed by GitHub

Remove unused deps and flags from flutter tool. (#22571)

parent e3ec1cc1
...@@ -204,7 +204,6 @@ BuildApp() { ...@@ -204,7 +204,6 @@ BuildApp() {
build bundle \ build bundle \
--target-platform=ios \ --target-platform=ios \
--target="${target_path}" \ --target="${target_path}" \
--snapshot="${build_dir}/snapshot_blob.bin" \
--${build_mode} \ --${build_mode} \
--depfile="${build_dir}/snapshot_blob.bin.d" \ --depfile="${build_dir}/snapshot_blob.bin.d" \
--asset-dir="${derived_dir}/flutter_assets" \ --asset-dir="${derived_dir}/flutter_assets" \
......
...@@ -555,7 +555,7 @@ class FlutterTask extends BaseFlutterTask { ...@@ -555,7 +555,7 @@ class FlutterTask extends BaseFlutterTask {
include "flutter_assets/**" // the working dir and its files include "flutter_assets/**" // the working dir and its files
if (buildMode != 'debug' || compilationTraceFilePath) { if (buildMode == 'release' || buildMode == 'profile') {
if (buildSharedLibrary) { if (buildSharedLibrary) {
include "app.so" include "app.so"
} else { } else {
......
...@@ -18,7 +18,6 @@ import 'globals.dart'; ...@@ -18,7 +18,6 @@ import 'globals.dart';
const String defaultMainPath = 'lib/main.dart'; const String defaultMainPath = 'lib/main.dart';
const String defaultAssetBasePath = '.'; const String defaultAssetBasePath = '.';
const String defaultManifestPath = 'pubspec.yaml'; const String defaultManifestPath = 'pubspec.yaml';
String get defaultSnapshotPath => fs.path.join(getBuildDirectory(), 'snapshot_blob.bin');
String get defaultDepfilePath => fs.path.join(getBuildDirectory(), 'snapshot_blob.bin.d'); String get defaultDepfilePath => fs.path.join(getBuildDirectory(), 'snapshot_blob.bin.d');
String get defaultApplicationKernelPath => fs.path.join(getBuildDirectory(), 'app.dill'); String get defaultApplicationKernelPath => fs.path.join(getBuildDirectory(), 'app.dill');
const String defaultPrivateKeyPath = 'privatekey.der'; const String defaultPrivateKeyPath = 'privatekey.der';
...@@ -27,15 +26,12 @@ const String _kKernelKey = 'kernel_blob.bin'; ...@@ -27,15 +26,12 @@ const String _kKernelKey = 'kernel_blob.bin';
const String _kVMSnapshotData = 'vm_snapshot_data'; const String _kVMSnapshotData = 'vm_snapshot_data';
const String _kIsolateSnapshotData = 'isolate_snapshot_data'; const String _kIsolateSnapshotData = 'isolate_snapshot_data';
const String _kIsolateSnapshotInstr = 'isolate_snapshot_instr'; const String _kIsolateSnapshotInstr = 'isolate_snapshot_instr';
const String _kDylibKey = 'libapp.so';
const String _kPlatformKernelKey = 'platform_strong.dill';
Future<void> build({ Future<void> build({
TargetPlatform platform, TargetPlatform platform,
BuildMode buildMode, BuildMode buildMode,
String mainPath = defaultMainPath, String mainPath = defaultMainPath,
String manifestPath = defaultManifestPath, String manifestPath = defaultManifestPath,
String snapshotPath,
String applicationKernelFilePath, String applicationKernelFilePath,
String depfilePath, String depfilePath,
String privateKeyPath = defaultPrivateKeyPath, String privateKeyPath = defaultPrivateKeyPath,
...@@ -51,7 +47,6 @@ Future<void> build({ ...@@ -51,7 +47,6 @@ Future<void> build({
List<String> fileSystemRoots, List<String> fileSystemRoots,
String fileSystemScheme, String fileSystemScheme,
}) async { }) async {
snapshotPath ??= defaultSnapshotPath;
depfilePath ??= defaultDepfilePath; depfilePath ??= defaultDepfilePath;
assetDirPath ??= getAssetBuildDirectory(); assetDirPath ??= getAssetBuildDirectory();
packagesPath ??= fs.path.absolute(PackageMap.globalPackagesPath); packagesPath ??= fs.path.absolute(PackageMap.globalPackagesPath);
...@@ -150,7 +145,6 @@ Future<void> assemble({ ...@@ -150,7 +145,6 @@ Future<void> assemble({
BuildMode buildMode, BuildMode buildMode,
AssetBundle assetBundle, AssetBundle assetBundle,
DevFSContent kernelContent, DevFSContent kernelContent,
File dylibFile,
String privateKeyPath = defaultPrivateKeyPath, String privateKeyPath = defaultPrivateKeyPath,
String assetDirPath, String assetDirPath,
String compilationTraceFilePath, String compilationTraceFilePath,
...@@ -168,17 +162,13 @@ Future<void> assemble({ ...@@ -168,17 +162,13 @@ Future<void> assemble({
assetEntries[_kIsolateSnapshotData] = DevFSFileContent(fs.file(isolateSnapshotData)); assetEntries[_kIsolateSnapshotData] = DevFSFileContent(fs.file(isolateSnapshotData));
assetEntries[_kIsolateSnapshotInstr] = DevFSFileContent(fs.file(isolateSnapshotInstr)); assetEntries[_kIsolateSnapshotInstr] = DevFSFileContent(fs.file(isolateSnapshotInstr));
} else { } else {
final String platformKernelDill = artifacts.getArtifactPath(Artifact.platformKernelDill);
final String vmSnapshotData = artifacts.getArtifactPath(Artifact.vmSnapshotData, null, buildMode); final String vmSnapshotData = artifacts.getArtifactPath(Artifact.vmSnapshotData, null, buildMode);
final String isolateSnapshotData = artifacts.getArtifactPath(Artifact.isolateSnapshotData, null, buildMode); final String isolateSnapshotData = artifacts.getArtifactPath(Artifact.isolateSnapshotData, null, buildMode);
assetEntries[_kKernelKey] = kernelContent; assetEntries[_kKernelKey] = kernelContent;
assetEntries[_kPlatformKernelKey] = DevFSFileContent(fs.file(platformKernelDill));
assetEntries[_kVMSnapshotData] = DevFSFileContent(fs.file(vmSnapshotData)); assetEntries[_kVMSnapshotData] = DevFSFileContent(fs.file(vmSnapshotData));
assetEntries[_kIsolateSnapshotData] = DevFSFileContent(fs.file(isolateSnapshotData)); assetEntries[_kIsolateSnapshotData] = DevFSFileContent(fs.file(isolateSnapshotData));
} }
} }
if (dylibFile != null)
assetEntries[_kDylibKey] = DevFSFileContent(dylibFile);
printTrace('Writing asset files to $assetDirPath'); printTrace('Writing asset files to $assetDirPath');
ensureDirectoryExists(assetDirPath); ensureDirectoryExists(assetDirPath);
......
...@@ -22,7 +22,6 @@ class BuildBundleCommand extends BuildSubCommand { ...@@ -22,7 +22,6 @@ class BuildBundleCommand extends BuildSubCommand {
..addOption('asset-base', help: 'Ignored. Will be removed.', hide: !verboseHelp) ..addOption('asset-base', help: 'Ignored. Will be removed.', hide: !verboseHelp)
..addOption('manifest', defaultsTo: defaultManifestPath) ..addOption('manifest', defaultsTo: defaultManifestPath)
..addOption('private-key', defaultsTo: defaultPrivateKeyPath) ..addOption('private-key', defaultsTo: defaultPrivateKeyPath)
..addOption('snapshot', defaultsTo: defaultSnapshotPath)
..addOption('depfile', defaultsTo: defaultDepfilePath) ..addOption('depfile', defaultsTo: defaultDepfilePath)
..addOption('kernel-file', defaultsTo: defaultApplicationKernelPath) ..addOption('kernel-file', defaultsTo: defaultApplicationKernelPath)
..addOption('target-platform', ..addOption('target-platform',
...@@ -93,7 +92,6 @@ class BuildBundleCommand extends BuildSubCommand { ...@@ -93,7 +92,6 @@ class BuildBundleCommand extends BuildSubCommand {
buildMode: buildMode, buildMode: buildMode,
mainPath: targetFile, mainPath: targetFile,
manifestPath: argResults['manifest'], manifestPath: argResults['manifest'],
snapshotPath: argResults['snapshot'],
applicationKernelFilePath: argResults['kernel-file'], applicationKernelFilePath: argResults['kernel-file'],
depfilePath: argResults['depfile'], depfilePath: argResults['depfile'],
privateKeyPath: argResults['private-key'], privateKeyPath: argResults['private-key'],
......
...@@ -169,7 +169,6 @@ void main() { ...@@ -169,7 +169,6 @@ void main() {
genSnapshot.outputs = <String, String>{ genSnapshot.outputs = <String, String>{
fs.path.join(outputPath, 'snapshot_assembly.S'): '', fs.path.join(outputPath, 'snapshot_assembly.S'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'snapshot_assembly.S')} : ',
}; };
final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']); final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']);
...@@ -213,7 +212,6 @@ void main() { ...@@ -213,7 +212,6 @@ void main() {
genSnapshot.outputs = <String, String>{ genSnapshot.outputs = <String, String>{
fs.path.join(outputPath, 'snapshot_assembly.S'): '', fs.path.join(outputPath, 'snapshot_assembly.S'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'snapshot_assembly.S')} : ',
}; };
final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']); final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']);
...@@ -258,7 +256,6 @@ void main() { ...@@ -258,7 +256,6 @@ void main() {
fs.path.join(outputPath, 'isolate_snapshot_data'): '', fs.path.join(outputPath, 'isolate_snapshot_data'): '',
fs.path.join(outputPath, 'vm_snapshot_instr'): '', fs.path.join(outputPath, 'vm_snapshot_instr'): '',
fs.path.join(outputPath, 'isolate_snapshot_instr'): '', fs.path.join(outputPath, 'isolate_snapshot_instr'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'vm_snapshot_data')} : ',
}; };
final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']); final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']);
...@@ -307,7 +304,6 @@ void main() { ...@@ -307,7 +304,6 @@ void main() {
fs.path.join(outputPath, 'isolate_snapshot_data'): '', fs.path.join(outputPath, 'isolate_snapshot_data'): '',
fs.path.join(outputPath, 'vm_snapshot_instr'): '', fs.path.join(outputPath, 'vm_snapshot_instr'): '',
fs.path.join(outputPath, 'isolate_snapshot_instr'): '', fs.path.join(outputPath, 'isolate_snapshot_instr'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'vm_snapshot_data')} : ',
}; };
final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']); final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']);
...@@ -351,7 +347,6 @@ void main() { ...@@ -351,7 +347,6 @@ void main() {
genSnapshot.outputs = <String, String>{ genSnapshot.outputs = <String, String>{
fs.path.join(outputPath, 'snapshot_assembly.S'): '', fs.path.join(outputPath, 'snapshot_assembly.S'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'snapshot_assembly.S')} : ',
}; };
final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']); final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']);
...@@ -395,7 +390,6 @@ void main() { ...@@ -395,7 +390,6 @@ void main() {
genSnapshot.outputs = <String, String>{ genSnapshot.outputs = <String, String>{
fs.path.join(outputPath, 'snapshot_assembly.S'): '', fs.path.join(outputPath, 'snapshot_assembly.S'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'snapshot_assembly.S')} : ',
}; };
final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']); final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']);
...@@ -458,7 +452,6 @@ void main() { ...@@ -458,7 +452,6 @@ void main() {
fs.path.join(outputPath, 'isolate_snapshot_data'): '', fs.path.join(outputPath, 'isolate_snapshot_data'): '',
fs.path.join(outputPath, 'vm_snapshot_instr'): '', fs.path.join(outputPath, 'vm_snapshot_instr'): '',
fs.path.join(outputPath, 'isolate_snapshot_instr'): '', fs.path.join(outputPath, 'isolate_snapshot_instr'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'vm_snapshot_data')} : ',
}; };
final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']); final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']);
...@@ -507,7 +500,6 @@ void main() { ...@@ -507,7 +500,6 @@ void main() {
fs.path.join(outputPath, 'isolate_snapshot_data'): '', fs.path.join(outputPath, 'isolate_snapshot_data'): '',
fs.path.join(outputPath, 'vm_snapshot_instr'): '', fs.path.join(outputPath, 'vm_snapshot_instr'): '',
fs.path.join(outputPath, 'isolate_snapshot_instr'): '', fs.path.join(outputPath, 'isolate_snapshot_instr'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'vm_snapshot_data')} : ',
}; };
final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']); final RunResult successResult = RunResult(ProcessResult(1, 0, '', ''), <String>['command name', 'arguments...']);
...@@ -599,7 +591,6 @@ void main() { ...@@ -599,7 +591,6 @@ void main() {
genSnapshot.outputs = <String, String>{ genSnapshot.outputs = <String, String>{
fs.path.join(outputPath, 'isolate_snapshot_data'): '', fs.path.join(outputPath, 'isolate_snapshot_data'): '',
fs.path.join(outputPath, 'isolate_snapshot_instr'): '', fs.path.join(outputPath, 'isolate_snapshot_instr'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'vm_snapshot_data')} : ',
}; };
final int genSnapshotExitCode = await snapshotter.build( final int genSnapshotExitCode = await snapshotter.build(
...@@ -643,7 +634,6 @@ void main() { ...@@ -643,7 +634,6 @@ void main() {
genSnapshot.outputs = <String, String>{ genSnapshot.outputs = <String, String>{
fs.path.join(outputPath, 'isolate_snapshot_data'): '', fs.path.join(outputPath, 'isolate_snapshot_data'): '',
fs.path.join(outputPath, 'isolate_snapshot_instr'): '', fs.path.join(outputPath, 'isolate_snapshot_instr'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'vm_snapshot_data')} : ',
}; };
final int genSnapshotExitCode = await snapshotter.build( final int genSnapshotExitCode = await snapshotter.build(
...@@ -698,7 +688,6 @@ void main() { ...@@ -698,7 +688,6 @@ void main() {
genSnapshot.outputs = <String, String>{ genSnapshot.outputs = <String, String>{
fs.path.join(outputPath, 'isolate_snapshot_data'): '', fs.path.join(outputPath, 'isolate_snapshot_data'): '',
fs.path.join(outputPath, 'isolate_snapshot_instr'): '', fs.path.join(outputPath, 'isolate_snapshot_instr'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'vm_snapshot_data')} : ',
}; };
final int genSnapshotExitCode = await snapshotter.build( final int genSnapshotExitCode = await snapshotter.build(
...@@ -741,7 +730,6 @@ void main() { ...@@ -741,7 +730,6 @@ void main() {
genSnapshot.outputs = <String, String>{ genSnapshot.outputs = <String, String>{
fs.path.join(outputPath, 'isolate_snapshot_data'): '', fs.path.join(outputPath, 'isolate_snapshot_data'): '',
fs.path.join(outputPath, 'isolate_snapshot_instr'): '', fs.path.join(outputPath, 'isolate_snapshot_instr'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'vm_snapshot_data')} : ',
}; };
final int genSnapshotExitCode = await snapshotter.build( final int genSnapshotExitCode = await snapshotter.build(
...@@ -795,7 +783,6 @@ void main() { ...@@ -795,7 +783,6 @@ void main() {
genSnapshot.outputs = <String, String>{ genSnapshot.outputs = <String, String>{
fs.path.join(outputPath, 'isolate_snapshot_data'): '', fs.path.join(outputPath, 'isolate_snapshot_data'): '',
fs.path.join(outputPath, 'isolate_snapshot_instr'): '', fs.path.join(outputPath, 'isolate_snapshot_instr'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'vm_snapshot_data')} : ',
}; };
final int genSnapshotExitCode = await snapshotter.build( final int genSnapshotExitCode = await snapshotter.build(
...@@ -838,7 +825,6 @@ void main() { ...@@ -838,7 +825,6 @@ void main() {
genSnapshot.outputs = <String, String>{ genSnapshot.outputs = <String, String>{
fs.path.join(outputPath, 'isolate_snapshot_data'): '', fs.path.join(outputPath, 'isolate_snapshot_data'): '',
fs.path.join(outputPath, 'isolate_snapshot_instr'): '', fs.path.join(outputPath, 'isolate_snapshot_instr'): '',
fs.path.join(outputPath, 'snapshot.d'): '${fs.path.join(outputPath, 'vm_snapshot_data')} : ',
}; };
final int genSnapshotExitCode = await snapshotter.build( final int genSnapshotExitCode = await snapshotter.build(
......
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