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