Use the new flutter_tools app. (flutter/engine#3533)
This commit is contained in:
@@ -67,17 +67,10 @@ template("flutter_app") {
|
||||
flutter_core_snapshot_vm_data = "$flutter_core_snapshot_gen_dir/vm_isolate_snapshot.bin"
|
||||
flutter_core_snapshot_isolate_data = "$flutter_core_snapshot_gen_dir/isolate_snapshot.bin"
|
||||
|
||||
dart_binary_label = "//dart/runtime/bin:dart($host_toolchain)"
|
||||
dart_binary_dir = get_label_info(dart_binary_label, "root_out_dir")
|
||||
dart_binary = "$dart_binary_dir/dart"
|
||||
|
||||
flutter_root = "//lib/flutter"
|
||||
flutter_tools_path = "$flutter_root/packages/flutter_tools"
|
||||
flutter_tools_label = "$flutter_root/packages/flutter_tools($host_toolchain)"
|
||||
flutter_tools_gen_dir = get_label_info(flutter_tools_label, "target_gen_dir")
|
||||
flutter_tools_name = get_label_info(flutter_tools_label, "name")
|
||||
flutter_tools_packages = "$flutter_tools_gen_dir/$flutter_tools_name.packages"
|
||||
flutter_tools_main = "$flutter_tools_path/bin/fuchsia_builder.dart"
|
||||
flutter_tools_out_dir = get_label_info(flutter_tools_label, "root_out_dir")
|
||||
flutter_tools_bin = "$flutter_tools_out_dir/dart-tools/flutter_tools"
|
||||
|
||||
dot_packages = "$target_gen_dir/$dart_package_name.packages"
|
||||
bundle_path = "$root_out_dir/$bundle_name"
|
||||
@@ -140,7 +133,6 @@ template("flutter_app") {
|
||||
depfile = bundle_depfile
|
||||
|
||||
inputs = [
|
||||
flutter_tools_main,
|
||||
snapshot_path,
|
||||
]
|
||||
if (defined(invoker.manifest)) {
|
||||
@@ -154,16 +146,10 @@ template("flutter_app") {
|
||||
script = "//flutter/build/package.py"
|
||||
|
||||
args = [
|
||||
"--root",
|
||||
rebase_path(dart_binary_dir),
|
||||
"--flutter-root",
|
||||
rebase_path(flutter_root),
|
||||
"--dart",
|
||||
rebase_path(dart_binary),
|
||||
"--flutter-tools-packages",
|
||||
rebase_path(flutter_tools_packages),
|
||||
"--flutter-tools-main",
|
||||
rebase_path(flutter_tools_main),
|
||||
"--flutter-tools",
|
||||
rebase_path(flutter_tools_bin),
|
||||
"--working-dir",
|
||||
rebase_path("$target_gen_dir/build"),
|
||||
"--app-dir",
|
||||
@@ -188,7 +174,6 @@ template("flutter_app") {
|
||||
|
||||
deps = [
|
||||
":$flutter_snapshot_name",
|
||||
dart_binary_label,
|
||||
flutter_tools_label,
|
||||
]
|
||||
}
|
||||
|
||||
@@ -12,16 +12,10 @@ import sys
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='Package a Flutter application')
|
||||
|
||||
parser.add_argument('--root', type=str, required=True,
|
||||
help='The root of the output directory')
|
||||
parser.add_argument('--flutter-root', type=str, required=True,
|
||||
help='The root of the Flutter SDK')
|
||||
parser.add_argument('--dart', type=str, required=True,
|
||||
help='The Dart binary to use')
|
||||
parser.add_argument('--flutter-tools-packages', type=str, required=True,
|
||||
help='The package map for the Flutter tool')
|
||||
parser.add_argument('--flutter-tools-main', type=str, required=True,
|
||||
help='The main.dart file for the Flutter tool')
|
||||
parser.add_argument('--flutter-tools', type=str, required=True,
|
||||
help='The executable for the Flutter tool')
|
||||
parser.add_argument('--working-dir', type=str, required=True,
|
||||
help='The directory where to put intermediate files')
|
||||
parser.add_argument('--app-dir', type=str, required=True,
|
||||
@@ -41,13 +35,10 @@ def main():
|
||||
args = parser.parse_args()
|
||||
|
||||
env = os.environ.copy()
|
||||
env['LD_LIBRARY_PATH'] = args.root
|
||||
env['FLUTTER_ROOT'] = args.flutter_root
|
||||
|
||||
call_args = [
|
||||
args.dart,
|
||||
'--packages=%s' % args.flutter_tools_packages,
|
||||
args.flutter_tools_main,
|
||||
args.flutter_tools,
|
||||
'--working-dir=%s' % args.working_dir,
|
||||
'--packages=%s' % args.packages,
|
||||
'--snapshot=%s' % args.snapshot,
|
||||
|
||||
Reference in New Issue
Block a user