From 5fae5d52cf2f64385d247ecbb98e34bee3204826 Mon Sep 17 00:00:00 2001 From: "P.Y. Laligand" Date: Fri, 13 Oct 2017 17:00:58 -0700 Subject: [PATCH] Allow the project to be mapped to a location other than //flutter. (#4203) This is for Fuchsia where we would like it to be located at //third_party/flutter. --- BUILD.gn | 42 +++++++++++++++----------- assets/BUILD.gn | 6 +++- build/dart/rules.gni | 6 ++-- build/flutter_app.gni | 30 +++++++++--------- common/BUILD.gn | 5 ++- content_handler/BUILD.gn | 16 +++++----- examples/hello_flutter/BUILD.gn | 2 +- examples/spinning_square/BUILD.gn | 2 +- flow/BUILD.gn | 12 +++++--- fml/BUILD.gn | 8 +++-- glue/BUILD.gn | 6 +++- lib/io/BUILD.gn | 4 +++ lib/snapshot/BUILD.gn | 2 +- lib/ui/BUILD.gn | 18 ++++++----- lib/ui/dart_ui.gni | 26 ++++++++-------- runtime/BUILD.gn | 30 ++++++++++++------ shell/common/BUILD.gn | 28 +++++++++-------- shell/gpu/BUILD.gn | 18 ++++++----- shell/platform/android/BUILD.gn | 24 +++++++++------ shell/platform/darwin/BUILD.gn | 22 ++++++++------ shell/platform/darwin/common/BUILD.gn | 20 +++++++----- shell/platform/darwin/desktop/BUILD.gn | 18 ++++++----- shell/platform/darwin/ios/BUILD.gn | 26 +++++++++------- shell/platform/embedder/BUILD.gn | 16 +++++++--- shell/platform/linux/BUILD.gn | 8 ++--- shell/testing/BUILD.gn | 8 +++-- sky/BUILD.gn | 4 +-- sky/dist/BUILD.gn | 18 +++++------ sky/engine/BUILD.gn | 8 ++--- sky/engine/core/BUILD.gn | 28 +++++++++-------- sky/engine/platform/BUILD.gn | 12 +++++--- sky/engine/public/BUILD.gn | 10 +++++- sky/engine/web/BUILD.gn | 16 ++++++---- sky/engine/wtf/BUILD.gn | 13 ++++---- sky/packages/BUILD.gn | 6 ++-- sky/packages/flutter_services/BUILD.gn | 2 +- sky/packages/sky_engine/BUILD.gn | 6 ++-- sky/packages/sky_services/BUILD.gn | 2 +- synchronization/BUILD.gn | 8 +++-- testing/BUILD.gn | 6 +++- third_party/txt/BUILD.gn | 2 +- vulkan/BUILD.gn | 1 + 42 files changed, 329 insertions(+), 216 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 6ef04fba07de6..84e7b9763dbda 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -6,56 +6,62 @@ group("flutter") { testonly = true deps = [ - "//flutter/lib/snapshot:compile_platform", - "//flutter/lib/snapshot:generate_snapshot_bin", - "//flutter/sky", - "//flutter/third_party/txt", + "$flutter_root/lib/snapshot:compile_platform", + "$flutter_root/lib/snapshot:generate_snapshot_bin", + "$flutter_root/sky", + "$flutter_root/third_party/txt", ] if (!is_fuchsia) { if (current_toolchain == host_toolchain) { deps += [ "//dart:create_sdk", - "//flutter/frontend_server", + "$flutter_root/frontend_server", ] } } if (is_fuchsia) { deps += [ - "//flutter/content_handler", - "//flutter/content_handler:aot_content_handler", - "//flutter/examples", - "//flutter/flow", + "$flutter_root/content_handler", + "$flutter_root/content_handler:aot_content_handler", + "$flutter_root/examples", + "$flutter_root/flow", ] } # If on the host, compile all unittests targets. if (current_toolchain == host_toolchain) { if (is_mac) { - deps += [ "//flutter/shell/platform/darwin:flutter_channels_unittests" ] + deps += [ "$flutter_root/shell/platform/darwin:flutter_channels_unittests" ] } if (!is_win) { - deps += [ "//flutter/shell/platform/embedder:flutter_engine" ] + deps += [ "$flutter_root/shell/platform/embedder:flutter_engine" ] } deps += [ - "//flutter/flow:flow_unittests", - "//flutter/fml:fml_unittests", - "//flutter/sky/engine/wtf:wtf_unittests", - "//flutter/synchronization:synchronization_unittests", - "//flutter/third_party/txt:txt_benchmarks", - "//flutter/third_party/txt:txt_unittests", + "$flutter_root/flow:flow_unittests", + "$flutter_root/fml:fml_unittests", + "$flutter_root/sky/engine/wtf:wtf_unittests", + "$flutter_root/synchronization:synchronization_unittests", + "$flutter_root/third_party/txt:txt_benchmarks", + "$flutter_root/third_party/txt:txt_unittests", "//garnet/public/lib/fxl:fxl_unittests", ] } } +config("config") { + include_dirs = [ + "..", + ] +} + if (!is_fuchsia) { group("dist") { testonly = true deps = [ - "//flutter/sky/dist", + "$flutter_root/sky/dist", ] } } diff --git a/assets/BUILD.gn b/assets/BUILD.gn index dbdeb464cee9e..6f9107929f971 100644 --- a/assets/BUILD.gn +++ b/assets/BUILD.gn @@ -13,7 +13,7 @@ source_set("assets") { ] deps = [ - "//flutter/glue", + "$flutter_root/glue", "//garnet/public/lib/fxl", "//garnet/public/lib/zip", ] @@ -21,4 +21,8 @@ source_set("assets") { public_deps = [ "//third_party/zlib:minizip", ] + + public_configs = [ + "$flutter_root:config", + ] } diff --git a/build/dart/rules.gni b/build/dart/rules.gni index 16b4402c6a4b9..c30f7651a8fe4 100644 --- a/build/dart/rules.gni +++ b/build/dart/rules.gni @@ -44,7 +44,7 @@ template("dart_pkg_helper") { sdk_ext_mappings += invoker.sdk_ext_mappings } - script = rebase_path("flutter/build/dart/tools/dart_pkg.py", ".", "//") + script = rebase_path("$flutter_root/build/dart/tools/dart_pkg.py", ".", "//") entrypoints = [] if (defined(invoker.apps)) { @@ -61,7 +61,7 @@ template("dart_pkg_helper") { if (defined(invoker.sources)) { sources += invoker.sources } else if (defined(invoker.pkg_dir)) { - list_script = rebase_path("flutter/build/dart/tools/ls.py", ".", "//") + list_script = rebase_path("$flutter_root/build/dart/tools/ls.py", ".", "//") extra_flags += [ "--read_only" ] ls_sources = exec_script(list_script, [ @@ -112,7 +112,7 @@ template("dart_pkg") { pubspec_yaml_path = rebase_path("pubspec.yaml") } dart_package_name_script = - rebase_path("flutter/build/dart/tools/dart_package_name.py", ".", "//") + rebase_path("$flutter_root/build/dart/tools/dart_package_name.py", ".", "//") dart_package_name = exec_script(dart_package_name_script, [ "--pubspec", diff --git a/build/flutter_app.gni b/build/flutter_app.gni index 106611104a454..52582235d2e63 100644 --- a/build/flutter_app.gni +++ b/build/flutter_app.gni @@ -5,7 +5,7 @@ assert(is_fuchsia) import("//build/dart/dart_package.gni") -import("//flutter/lib/ui/dart_ui.gni") +import("$flutter_root/lib/ui/dart_ui.gni") import("//topaz/public/dart-pkg/fuchsia/sdk_ext.gni") import("//topaz/public/dart-pkg/zircon/sdk_ext.gni") import("//topaz/public/lib/ui/flutter/sdk_ext/sdk_ext.gni") @@ -18,9 +18,9 @@ gen_snapshot_label = "//dart/runtime/bin:gen_snapshot($host_toolchain)" gen_snapshot_dir = get_label_info(gen_snapshot_label, "root_out_dir") gen_snapshot = "$gen_snapshot_dir/gen_snapshot" -flutter_root = "//lib/flutter" +flutter_base = "//lib/flutter" flutter_tools_label = - "$flutter_root/packages/flutter_tools:fuchsia_builder($host_toolchain)" + "$flutter_base/packages/flutter_tools:fuchsia_builder($host_toolchain)" flutter_tools_out_dir = get_label_info(flutter_tools_label, "root_out_dir") flutter_tools_bin = "$flutter_tools_out_dir/dart-tools/fuchsia_builder" @@ -50,7 +50,7 @@ template("flutter_jit_app") { bundle_name = "${target_name}.flx" } - flutter_core_snapshot_label = "//flutter/lib/snapshot:generate_snapshot_bin" + flutter_core_snapshot_label = "$flutter_root/lib/snapshot:generate_snapshot_bin" flutter_core_snapshot_gen_dir = get_label_info(flutter_core_snapshot_label, "target_gen_dir") flutter_core_snapshot_vm_data = @@ -91,7 +91,7 @@ template("flutter_jit_app") { sources = invoker.sources } - script = "//flutter/build/script_snapshot.py" + script = "$flutter_root/build/script_snapshot.py" args = [ "--snapshotter-path", @@ -144,11 +144,11 @@ template("flutter_jit_app") { bundle_path, ] - script = "//flutter/build/package.py" + script = "$flutter_root/build/package.py" args = [ "--flutter-root", - rebase_path(flutter_root), + rebase_path(flutter_base), "--flutter-tools", rebase_path(flutter_tools_bin), "--working-dir", @@ -225,8 +225,8 @@ template("flutter_aot_app") { mozart_dart_sdk_ext_files + [ main_dart, - "//flutter/runtime/dart_vm_entry_points.txt", - "//flutter/runtime/dart_vm_entry_points_fuchsia.txt", + "$flutter_root/runtime/dart_vm_entry_points.txt", + "$flutter_root/runtime/dart_vm_entry_points_fuchsia.txt", "//dart/runtime/bin/dart_io_entries.txt", ] @@ -238,7 +238,7 @@ template("flutter_aot_app") { sources = invoker.sources } - script = "//flutter/build/aot_snapshot.py" + script = "$flutter_root/build/aot_snapshot.py" args = [ "--snapshotter-path", rebase_path(gen_snapshot), @@ -262,9 +262,9 @@ template("flutter_aot_app") { "$root_gen_dir/dart-pkg/sky_engine/sdk_ext/vmservice_io.dart"), "--entry-points-manifest", - rebase_path("//flutter/runtime/dart_vm_entry_points.txt"), + rebase_path("$flutter_root/runtime/dart_vm_entry_points.txt"), "--entry-points-manifest", - rebase_path("//flutter/runtime/dart_vm_entry_points_fuchsia.txt"), + rebase_path("$flutter_root/runtime/dart_vm_entry_points_fuchsia.txt"), "--entry-points-manifest", rebase_path("//dart/runtime/bin/dart_io_entries.txt"), @@ -279,7 +279,7 @@ template("flutter_aot_app") { deps = [ ":$dart_package_name", - "//flutter/lib/snapshot:generate_dart_ui", + "$flutter_root/lib/snapshot:generate_dart_ui", gen_snapshot_label, ] @@ -323,11 +323,11 @@ template("flutter_aot_app") { bundle_path, ] - script = "//flutter/build/package.py" + script = "$flutter_root/build/package.py" args = [ "--flutter-root", - rebase_path(flutter_root), + rebase_path(flutter_base), "--flutter-tools", rebase_path(flutter_tools_bin), "--working-dir", diff --git a/common/BUILD.gn b/common/BUILD.gn index 239f33bea0f9b..53b71914d49d1 100644 --- a/common/BUILD.gn +++ b/common/BUILD.gn @@ -20,5 +20,8 @@ source_set("common") { "//garnet/public/lib/fxl", ] - public_configs = [ ":flutter_config" ] + public_configs = [ + ":flutter_config", + "$flutter_root:config", + ] } diff --git a/content_handler/BUILD.gn b/content_handler/BUILD.gn index dbbb8bb668201..f9f5f77cb2a59 100644 --- a/content_handler/BUILD.gn +++ b/content_handler/BUILD.gn @@ -46,14 +46,14 @@ template("flutter_content_handler") { deps = [ "//dart/runtime/bin:libdart_builtin", "//dart/runtime/platform:libdart_platform", - "//flutter/assets", - "//flutter/common", - "//flutter/flow", - "//flutter/glue", - "//flutter/lib/ui", - "//flutter/runtime", - "//flutter/sky/engine/platform", - "//flutter/vulkan", + "$flutter_root/assets", + "$flutter_root/common", + "$flutter_root/flow", + "$flutter_root/glue", + "$flutter_root/lib/ui", + "$flutter_root/runtime", + "$flutter_root/sky/engine/platform", + "$flutter_root/vulkan", "//garnet/public/lib/app/cpp", "//garnet/public/lib/fsl", "//garnet/public/lib/fxl", diff --git a/examples/hello_flutter/BUILD.gn b/examples/hello_flutter/BUILD.gn index 0b352cd62bdf9..ff76a924b1ba4 100644 --- a/examples/hello_flutter/BUILD.gn +++ b/examples/hello_flutter/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/build/flutter_app.gni") +import("$flutter_root/build/flutter_app.gni") flutter_jit_app("hello_flutter") { main_dart = "lib/main.dart" diff --git a/examples/spinning_square/BUILD.gn b/examples/spinning_square/BUILD.gn index 883d98a65a2f0..a60ef1c6f1b71 100644 --- a/examples/spinning_square/BUILD.gn +++ b/examples/spinning_square/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/build/flutter_app.gni") +import("$flutter_root/build/flutter_app.gni") flutter_app("spinning_square") { main_dart = "lib/main.dart" diff --git a/flow/BUILD.gn b/flow/BUILD.gn index 9b9530340ddea..b6d633ece8d78 100644 --- a/flow/BUILD.gn +++ b/flow/BUILD.gn @@ -57,10 +57,14 @@ source_set("flow") { "//garnet/public/lib/fxl", ] + public_configs = [ + "$flutter_root:config", + ] + deps = [ - "//flutter/common", - "//flutter/glue", - "//flutter/synchronization", + "$flutter_root/common", + "$flutter_root/glue", + "$flutter_root/synchronization", "//third_party/skia", "//third_party/skia:gpu", ] @@ -96,7 +100,7 @@ executable("flow_unittests") { deps = [ ":flow", "//dart/runtime:libdart_jit", # for tracing - "//flutter/testing", + "$flutter_root/testing", "//third_party/skia", ] } diff --git a/fml/BUILD.gn b/fml/BUILD.gn index 2bd6555233737..1e57600e46803 100644 --- a/fml/BUILD.gn +++ b/fml/BUILD.gn @@ -33,6 +33,10 @@ source_set("fml") { configs += [ "//third_party/icu:icu_config" ] + public_configs = [ + "$flutter_root:config", + ] + libs = [] if (is_ios || is_mac) { @@ -111,8 +115,8 @@ executable("fml_unittests") { deps = [ "//dart/runtime:libdart_jit", - "//flutter/fml", - "//flutter/testing", + "$flutter_root/fml", + "$flutter_root/testing", "//garnet/public/lib/fxl", ] } diff --git a/glue/BUILD.gn b/glue/BUILD.gn index 84903ac8ad6fd..ffad7e3ff6a68 100644 --- a/glue/BUILD.gn +++ b/glue/BUILD.gn @@ -12,6 +12,10 @@ source_set("glue") { "//garnet/public/lib/fxl", ] + public_configs = [ + "$flutter_root:config", + ] + if (is_fuchsia) { sources += [ "stack_trace_fuchsia.cc" ] @@ -21,6 +25,6 @@ source_set("glue") { } else { sources += [ "stack_trace_base.cc" ] - deps += [ "//flutter/fml" ] + deps += [ "$flutter_root/fml" ] } } diff --git a/lib/io/BUILD.gn b/lib/io/BUILD.gn index 914cc905842d6..c1a1d3950fbb8 100644 --- a/lib/io/BUILD.gn +++ b/lib/io/BUILD.gn @@ -18,4 +18,8 @@ source_set("io") { configs += [ "//dart/runtime:dart_config", ] + + public_configs = [ + "$flutter_root:config", + ] } diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn index 48ff46adff7ef..92136bd08ab4c 100644 --- a/lib/snapshot/BUILD.gn +++ b/lib/snapshot/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/lib/ui/dart_ui.gni") +import("$flutter_root/lib/ui/dart_ui.gni") import("//dart/runtime/bin/io_sources.gni") import("//dart/runtime/lib/async_sources.gni") diff --git a/lib/ui/BUILD.gn b/lib/ui/BUILD.gn index 14de857f83b00..db536aace7273 100644 --- a/lib/ui/BUILD.gn +++ b/lib/ui/BUILD.gn @@ -85,15 +85,19 @@ source_set("ui") { "window/window.h", ] + public_configs = [ + "$flutter_root:config", + ] + deps = [ "//dart/runtime/bin:embedded_dart_io", - "//flutter/assets", - "//flutter/common", - "//flutter/flow", - "//flutter/glue", - "//flutter/runtime:test_font", - "//flutter/sky/engine", - "//flutter/third_party/txt", + "$flutter_root/assets", + "$flutter_root/common", + "$flutter_root/flow", + "$flutter_root/glue", + "$flutter_root/runtime:test_font", + "$flutter_root/sky/engine", + "$flutter_root/third_party/txt", "//third_party/rapidjson", "//third_party/skia", "//third_party/skia:gpu", diff --git a/lib/ui/dart_ui.gni b/lib/ui/dart_ui.gni index 39d58e92e29d2..418b6531004a0 100644 --- a/lib/ui/dart_ui.gni +++ b/lib/ui/dart_ui.gni @@ -3,18 +3,18 @@ # found in the LICENSE file. dart_ui_files = [ - "//flutter/lib/ui/compositing.dart", - "//flutter/lib/ui/geometry.dart", - "//flutter/lib/ui/hash_codes.dart", - "//flutter/lib/ui/hooks.dart", - "//flutter/lib/ui/lerp.dart", - "//flutter/lib/ui/natives.dart", - "//flutter/lib/ui/painting.dart", - "//flutter/lib/ui/pointer.dart", - "//flutter/lib/ui/semantics.dart", - "//flutter/lib/ui/text.dart", - "//flutter/lib/ui/ui.dart", - "//flutter/lib/ui/window.dart", + "$flutter_root/lib/ui/compositing.dart", + "$flutter_root/lib/ui/geometry.dart", + "$flutter_root/lib/ui/hash_codes.dart", + "$flutter_root/lib/ui/hooks.dart", + "$flutter_root/lib/ui/lerp.dart", + "$flutter_root/lib/ui/natives.dart", + "$flutter_root/lib/ui/painting.dart", + "$flutter_root/lib/ui/pointer.dart", + "$flutter_root/lib/ui/semantics.dart", + "$flutter_root/lib/ui/text.dart", + "$flutter_root/lib/ui/ui.dart", + "$flutter_root/lib/ui/window.dart", ] -dart_ui_path = "//flutter/lib/ui/ui.dart" +dart_ui_path = "$flutter_root/lib/ui/ui.dart" diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index eac07c4702285..90d23f5b0f98c 100644 --- a/runtime/BUILD.gn +++ b/runtime/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. import("//dart/runtime/bin/vmservice/vmservice_sources.gni") -import("//flutter/common/config.gni") +import("$flutter_root/common/config.gni") action("gen_embedded_resources_cc") { script = "//dart/runtime/tools/create_resources.py" @@ -37,6 +37,9 @@ source_set("embedded_resources_cc") { deps = [ ":gen_embedded_resources_cc", ] + public_configs = [ + "$flutter_root:config", + ] } source_set("test_font") { @@ -47,6 +50,9 @@ source_set("test_font") { deps = [ "//third_party/skia", ] + public_configs = [ + "$flutter_root:config", + ] defines = [] if (flutter_runtime_mode == "debug" || current_toolchain == host_toolchain) { # Though the test font data is small, we dont want to add to the binary size @@ -88,24 +94,28 @@ source_set("runtime") { ":test_font", "//dart/runtime:dart_api", "//dart/runtime/bin:embedded_dart_io", - "//flutter/assets", - "//flutter/common", - "//flutter/flow", - "//flutter/glue", - "//flutter/lib/io", - "//flutter/lib/ui", - "//flutter/sky/engine/platform", - "//flutter/third_party/txt", + "$flutter_root/assets", + "$flutter_root/common", + "$flutter_root/flow", + "$flutter_root/glue", + "$flutter_root/lib/io", + "$flutter_root/lib/ui", + "$flutter_root/sky/engine/platform", + "$flutter_root/third_party/txt", "//garnet/public/lib/fxl", "//third_party/rapidjson", "//third_party/skia", "//topaz/lib/tonic", ] + public_configs = [ + "$flutter_root:config", + ] + # In AOT mode, precompiled snapshots contain the instruction buffer. # Generation of the same requires all application specific script code to be # specified up front. In such cases, there can be no generic snapshot. if (!flutter_aot) { - deps += [ "//flutter/lib/snapshot" ] + deps += [ "$flutter_root/lib/snapshot" ] } } diff --git a/shell/common/BUILD.gn b/shell/common/BUILD.gn index 2e4c433e9cf64..aa7fd534d9ed3 100644 --- a/shell/common/BUILD.gn +++ b/shell/common/BUILD.gn @@ -57,9 +57,9 @@ template("dart_embedder_resources") { dart_embedder_resources("generate_embedder_diagnostic_server_resources_cc") { inputs = [ - "//flutter/shell/common/diagnostic/diagnostic_server.dart", + "$flutter_root/shell/common/diagnostic/diagnostic_server.dart", ] - root_prefix = "//flutter/shell/common/diagnostic/" + root_prefix = "$flutter_root/shell/common/diagnostic/" output = "$target_gen_dir/embedder_diagnostic_server_resources.cc" table_name = "sky_embedder_diagnostic_server" } @@ -103,16 +103,16 @@ source_set("common") { ":generate_embedder_diagnostic_server_resources_cc", "//dart/runtime:dart_api", "//dart/runtime/platform:libdart_platform", - "//flutter/assets", - "//flutter/common", - "//flutter/flow", - "//flutter/fml", - "//flutter/glue", - "//flutter/lib/ui", - "//flutter/runtime", - "//flutter/sky/engine/wtf", - "//flutter/synchronization", - "//flutter/third_party/txt", + "$flutter_root/assets", + "$flutter_root/common", + "$flutter_root/flow", + "$flutter_root/fml", + "$flutter_root/glue", + "$flutter_root/lib/ui", + "$flutter_root/runtime", + "$flutter_root/sky/engine/wtf", + "$flutter_root/synchronization", + "$flutter_root/third_party/txt", "//garnet/public/lib/fxl", "//third_party/rapidjson", "//third_party/skia", @@ -122,4 +122,8 @@ source_set("common") { public_deps = [ "//topaz/lib/tonic", ] + + public_configs = [ + "$flutter_root:config", + ] } diff --git a/shell/gpu/BUILD.gn b/shell/gpu/BUILD.gn index f58d0d8b8022e..6cb36faac8b46 100644 --- a/shell/gpu/BUILD.gn +++ b/shell/gpu/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/shell/config.gni") +import("$flutter_root/shell/config.gni") source_set("gpu") { sources = [ @@ -22,17 +22,21 @@ source_set("gpu") { } deps = [ - "//flutter/common", - "//flutter/flow", - "//flutter/glue", - "//flutter/shell/common", - "//flutter/synchronization", + "$flutter_root/common", + "$flutter_root/flow", + "$flutter_root/glue", + "$flutter_root/shell/common", + "$flutter_root/synchronization", "//garnet/public/lib/fxl", "//third_party/skia", "//third_party/skia:gpu", ] + public_configs = [ + "$flutter_root:config", + ] + if (shell_enable_vulkan) { - deps += [ "//flutter/vulkan" ] + deps += [ "$flutter_root/vulkan" ] } } diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index dcea867e9aa6d..517b2a5e4a96b 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -2,8 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/common/config.gni") -import("//flutter/shell/config.gni") +import("$flutter_root/common/config.gni") +import("$flutter_root/shell/config.gni") import("//build/config/android/config.gni") import("//build/config/android/rules.gni") @@ -37,13 +37,13 @@ shared_library("flutter_shell_native") { ] deps = [ - "//flutter/common", - "//flutter/flow", - "//flutter/fml", - "//flutter/lib/ui", - "//flutter/runtime", - "//flutter/shell/common", - "//flutter/shell/gpu", + "$flutter_root/common", + "$flutter_root/flow", + "$flutter_root/fml", + "$flutter_root/lib/ui", + "$flutter_root/runtime", + "$flutter_root/shell/common", + "$flutter_root/shell/gpu", "//garnet/public/lib/fxl", "//third_party/skia", ] @@ -53,6 +53,10 @@ shared_library("flutter_shell_native") { deps += [ "//dart/runtime:libdart_precompiled_runtime" ] } + public_configs = [ + "$flutter_root:config", + ] + defines = [] if (shell_enable_vulkan) { @@ -61,7 +65,7 @@ shared_library("flutter_shell_native") { "android_surface_vulkan.h", ] - deps += [ "//flutter/vulkan" ] + deps += [ "$flutter_root/vulkan" ] defines += [ "SHELL_ENABLE_VULKAN" ] } diff --git a/shell/platform/darwin/BUILD.gn b/shell/platform/darwin/BUILD.gn index 63409c8e66a47..2a998e873fb8c 100644 --- a/shell/platform/darwin/BUILD.gn +++ b/shell/platform/darwin/BUILD.gn @@ -39,17 +39,21 @@ source_set("flutter_channels") { set_sources_assignment_filter(sources_assignment_filter) deps = [ - "//flutter/common", - "//flutter/flow", - "//flutter/fml", - "//flutter/runtime", - "//flutter/shell/common", - "//flutter/shell/gpu", - "//flutter/shell/testing", - "//flutter/sky/engine/wtf", + "$flutter_root/common", + "$flutter_root/flow", + "$flutter_root/fml", + "$flutter_root/runtime", + "$flutter_root/shell/common", + "$flutter_root/shell/gpu", + "$flutter_root/shell/testing", + "$flutter_root/sky/engine/wtf", "//garnet/public/lib/fxl", "//third_party/skia", ] + + public_configs = [ + "$flutter_root:config", + ] } executable("flutter_channels_unittests") { @@ -65,6 +69,6 @@ executable("flutter_channels_unittests") { deps = [ ":flutter_channels", "//dart/runtime:libdart_jit", - "//flutter/testing", + "$flutter_root/testing", ] } diff --git a/shell/platform/darwin/common/BUILD.gn b/shell/platform/darwin/common/BUILD.gn index cda4ae6fbf1af..e7fd3c23286dd 100644 --- a/shell/platform/darwin/common/BUILD.gn +++ b/shell/platform/darwin/common/BUILD.gn @@ -18,15 +18,19 @@ source_set("common") { deps = [ "//dart/runtime:dart_api", - "//flutter/common", - "//flutter/flow", - "//flutter/fml", - "//flutter/runtime", - "//flutter/shell/common", - "//flutter/shell/gpu", - "//flutter/shell/testing", - "//flutter/sky/engine/wtf", + "$flutter_root/common", + "$flutter_root/flow", + "$flutter_root/fml", + "$flutter_root/runtime", + "$flutter_root/shell/common", + "$flutter_root/shell/gpu", + "$flutter_root/shell/testing", + "$flutter_root/sky/engine/wtf", "//garnet/public/lib/fxl", "//third_party/skia", ] + + public_configs = [ + "$flutter_root:config", + ] } diff --git a/shell/platform/darwin/desktop/BUILD.gn b/shell/platform/darwin/desktop/BUILD.gn index bf3371da558c5..ce56ba4d1372a 100644 --- a/shell/platform/darwin/desktop/BUILD.gn +++ b/shell/platform/darwin/desktop/BUILD.gn @@ -23,16 +23,20 @@ source_set("mac_desktop_platform") { deps = [ "//dart/runtime:libdart_jit", - "//flutter/common", - "//flutter/fml", - "//flutter/shell/common", - "//flutter/shell/gpu", - "//flutter/shell/platform/darwin/common", - "//flutter/shell/testing", - "//flutter/synchronization", + "$flutter_root/common", + "$flutter_root/fml", + "$flutter_root/shell/common", + "$flutter_root/shell/gpu", + "$flutter_root/shell/platform/darwin/common", + "$flutter_root/shell/testing", + "$flutter_root/synchronization", "//garnet/public/lib/fxl", "//third_party/skia", ] + + public_configs = [ + "$flutter_root:config", + ] } executable("shell_standalone") { diff --git a/shell/platform/darwin/ios/BUILD.gn b/shell/platform/darwin/ios/BUILD.gn index 5fd71c72b71d7..a0793fc6f6c4d 100644 --- a/shell/platform/darwin/ios/BUILD.gn +++ b/shell/platform/darwin/ios/BUILD.gn @@ -4,7 +4,7 @@ assert(is_ios) -import("//flutter/common/config.gni") +import("$flutter_root/common/config.gni") import("//build/config/ios/ios_sdk.gni") _flutter_framework_dir = "$root_out_dir/Flutter.framework" @@ -66,15 +66,15 @@ shared_library("flutter_framework_dylib") { ] deps = [ - "//flutter/flow", - "//flutter/fml", - "//flutter/glue", - "//flutter/lib/ui", - "//flutter/shell/common", - "//flutter/shell/gpu", - "//flutter/shell/platform/darwin/common", - "//flutter/sky/engine/platform", - "//flutter/sky/engine/wtf", + "$flutter_root/flow", + "$flutter_root/fml", + "$flutter_root/glue", + "$flutter_root/lib/ui", + "$flutter_root/shell/common", + "$flutter_root/shell/gpu", + "$flutter_root/shell/platform/darwin/common", + "$flutter_root/sky/engine/platform", + "$flutter_root/sky/engine/wtf", "//garnet/public/lib/fxl", "//third_party/skia", ] @@ -84,6 +84,10 @@ shared_library("flutter_framework_dylib") { deps += [ "//dart/runtime:libdart_precompiled_runtime" ] } + public_configs = [ + "$flutter_root:config", + ] + defines = [ "FLUTTER_FRAMEWORK" ] libs = [ @@ -112,7 +116,7 @@ copy("framework_dylib") { action("framework_install_name") { visibility = [ ":*" ] stamp_file = "$root_out_dir/flutter_install_name_stamp" - script = "//flutter/sky/tools/change_install_name.py" + script = "$flutter_root/sky/tools/change_install_name.py" inputs = [ "$_flutter_framework_dir/Flutter", diff --git a/shell/platform/embedder/BUILD.gn b/shell/platform/embedder/BUILD.gn index a039d8c573585..d58740f62859c 100644 --- a/shell/platform/embedder/BUILD.gn +++ b/shell/platform/embedder/BUILD.gn @@ -14,18 +14,26 @@ source_set("embedder") { deps = [ "//dart/runtime:libdart_jit", "//dart/runtime/bin:embedded_dart_io", - "//flutter/common", - "//flutter/fml", - "//flutter/shell/common", - "//flutter/shell/gpu", + "$flutter_root/common", + "$flutter_root/fml", + "$flutter_root/shell/common", + "$flutter_root/shell/gpu", "//garnet/public/lib/fxl", "//third_party/skia", "//topaz/lib/tonic", ] + + public_configs = [ + "$flutter_root:config", + ] } shared_library("flutter_engine") { deps = [ ":embedder", ] + + public_configs = [ + "$flutter_root:config", + ] } diff --git a/shell/platform/linux/BUILD.gn b/shell/platform/linux/BUILD.gn index 52ab272d5c2ce..c00053f8e5c7a 100644 --- a/shell/platform/linux/BUILD.gn +++ b/shell/platform/linux/BUILD.gn @@ -12,10 +12,10 @@ executable("linux") { deps = [ "//dart/runtime:libdart_jit", "//dart/runtime/bin:embedded_dart_io", - "//flutter/common", - "//flutter/fml", - "//flutter/shell/common", - "//flutter/shell/testing", + "$flutter_root/common", + "$flutter_root/fml", + "$flutter_root/shell/common", + "$flutter_root/shell/testing", "//garnet/public/lib/fxl", "//third_party/skia", "//topaz/lib/tonic", diff --git a/shell/testing/BUILD.gn b/shell/testing/BUILD.gn index 768166cf7f306..659c241cc49b8 100644 --- a/shell/testing/BUILD.gn +++ b/shell/testing/BUILD.gn @@ -13,9 +13,13 @@ source_set("testing") { ] deps = [ - "//flutter/common", - "//flutter/shell/common", + "$flutter_root/common", + "$flutter_root/shell/common", "//garnet/public/lib/fxl", "//third_party/skia", ] + + public_configs = [ + "$flutter_root:config", + ] } diff --git a/sky/BUILD.gn b/sky/BUILD.gn index ab016ebf33941..66045451407b5 100644 --- a/sky/BUILD.gn +++ b/sky/BUILD.gn @@ -6,10 +6,10 @@ group("sky") { testonly = true deps = [ - "//flutter/sky/packages", + "$flutter_root/sky/packages", ] if (!is_fuchsia) { - deps += [ "//flutter/shell" ] + deps += [ "$flutter_root/shell" ] } } diff --git a/sky/dist/BUILD.gn b/sky/dist/BUILD.gn index 45cd9e6ec3275..a7068e32ab65a 100644 --- a/sky/dist/BUILD.gn +++ b/sky/dist/BUILD.gn @@ -4,9 +4,9 @@ if (is_android) { action("flutter_services") { - script = "//flutter/sky/tools/dist_dart_pkg.py" + script = "$flutter_root/sky/tools/dist_dart_pkg.py" - source = "//flutter/sky/packages/flutter_services" + source = "$flutter_root/sky/packages/flutter_services" dest = "$root_build_dir/dist/packages/flutter_services" inputs = [ @@ -24,11 +24,11 @@ if (is_android) { ] deps = [ - "//flutter/sky/packages/flutter_services", + "$flutter_root/sky/packages/flutter_services", ] } action("sky_engine") { - script = "//flutter/sky/tools/dist_dart_pkg.py" + script = "$flutter_root/sky/tools/dist_dart_pkg.py" source = "$root_gen_dir/dart-pkg/sky_engine" dest = "$root_build_dir/dist/packages/sky_engine" @@ -48,13 +48,13 @@ if (is_android) { ] deps = [ - "//flutter/sky/packages/sky_engine", - "//flutter/sky/packages/sky_engine:sky_engine_pkg_helper", + "$flutter_root/sky/packages/sky_engine", + "$flutter_root/sky/packages/sky_engine:sky_engine_pkg_helper", ] } action("sky_services") { - script = "//flutter/sky/tools/dist_dart_pkg.py" + script = "$flutter_root/sky/tools/dist_dart_pkg.py" source = "$root_gen_dir/dart-pkg/sky_services" dest = "$root_build_dir/dist/packages/sky_services" @@ -74,8 +74,8 @@ if (is_android) { ] deps = [ - "//flutter/sky/packages/sky_services", - "//flutter/sky/packages/sky_services:sky_services_pkg_helper", + "$flutter_root/sky/packages/sky_services", + "$flutter_root/sky/packages/sky_services:sky_services_pkg_helper", ] } } diff --git a/sky/engine/BUILD.gn b/sky/engine/BUILD.gn index 6661b44048221..7e2675d1a7e89 100644 --- a/sky/engine/BUILD.gn +++ b/sky/engine/BUILD.gn @@ -41,9 +41,9 @@ group("engine") { public_configs = [ ":config" ] public_deps = [ - "//flutter/sky/engine/core", - "//flutter/sky/engine/platform", - "//flutter/sky/engine/web", - "//flutter/sky/engine/wtf", + "$flutter_root/sky/engine/core", + "$flutter_root/sky/engine/platform", + "$flutter_root/sky/engine/web", + "$flutter_root/sky/engine/wtf", ] } diff --git a/sky/engine/core/BUILD.gn b/sky/engine/core/BUILD.gn index 84022913dbdca..7900a1a673931 100644 --- a/sky/engine/core/BUILD.gn +++ b/sky/engine/core/BUILD.gn @@ -2,20 +2,20 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/common/config.gni") -import("//flutter/sky/engine/core/core.gni") +import("$flutter_root/common/config.gni") +import("$flutter_root/sky/engine/core/core.gni") visibility = [ - "//flutter/sky/engine/*", - "//flutter/sky/shell/*", + "$flutter_root/sky/engine/*", + "$flutter_root/sky/shell/*", ] static_library("core") { output_name = "sky_core" deps = [ - "//flutter/assets", - "//flutter/sky/engine/platform", + "$flutter_root/assets", + "$flutter_root/sky/engine/platform", ] if (flutter_runtime_mode != "release") { @@ -24,17 +24,21 @@ static_library("core") { } configs += [ - "//flutter/sky/engine:config", - "//flutter/sky/engine:inside_blink", + "$flutter_root/sky/engine:config", + "$flutter_root/sky/engine:inside_blink", + ] + + public_configs = [ + "$flutter_root:config", ] sources = sky_core_files public_deps = [ - "//flutter/common", - "//flutter/flow", - "//flutter/glue", - "//flutter/sky/engine/wtf", + "$flutter_root/common", + "$flutter_root/flow", + "$flutter_root/glue", + "$flutter_root/sky/engine/wtf", "//garnet/public/lib/fxl", "//third_party/libpng", "//third_party/skia", diff --git a/sky/engine/platform/BUILD.gn b/sky/engine/platform/BUILD.gn index b8253e30c706d..dd6c473de5832 100644 --- a/sky/engine/platform/BUILD.gn +++ b/sky/engine/platform/BUILD.gn @@ -245,13 +245,17 @@ source_set("platform") { ] public_deps = [ - "//flutter/common", - "//flutter/sky/engine/wtf", + "$flutter_root/common", + "$flutter_root/sky/engine/wtf", "//third_party/skia", "//third_party/skia:effects", "//third_party/skia:gpu", ] + public_configs = [ + "$flutter_root:config", + ] + if (!is_mac) { sources += [ "fonts/opentype/OpenTypeVerticalData.cpp", @@ -289,8 +293,8 @@ source_set("platform") { } configs += [ - "//flutter/sky/engine:config", - "//flutter/sky/engine:non_test_config", + "$flutter_root/sky/engine:config", + "$flutter_root/sky/engine:non_test_config", ] defines = [ diff --git a/sky/engine/public/BUILD.gn b/sky/engine/public/BUILD.gn index 62b1d4d916ccf..76041ba280e9f 100644 --- a/sky/engine/public/BUILD.gn +++ b/sky/engine/public/BUILD.gn @@ -4,7 +4,7 @@ group("test_support") { deps = [ - "//flutter/sky/engine/web:test_support", + "$flutter_root/sky/engine/web:test_support", ] } @@ -15,10 +15,18 @@ source_set("platform_headers") { "platform/WebCommon.h", "platform/WebDiscardableMemory.h", ] + + public_configs = [ + "$flutter_root:config", + ] } source_set("web_headers") { public = [ "web/Sky.h", ] + + public_configs = [ + "$flutter_root:config", + ] } diff --git a/sky/engine/web/BUILD.gn b/sky/engine/web/BUILD.gn index 83e0e93edd71e..f96d58cb09cd6 100644 --- a/sky/engine/web/BUILD.gn +++ b/sky/engine/web/BUILD.gn @@ -8,19 +8,23 @@ source_set("web") { ] deps = [ - "//flutter/sky/engine/core", - "//flutter/sky/engine/platform", + "$flutter_root/sky/engine/core", + "$flutter_root/sky/engine/platform", ] configs += [ - "//flutter/sky/engine:config", - "//flutter/sky/engine:inside_blink", - "//flutter/sky/engine:non_test_config", + "$flutter_root/sky/engine:config", + "$flutter_root/sky/engine:inside_blink", + "$flutter_root/sky/engine:non_test_config", + ] + + public_configs = [ + "$flutter_root:config", ] if (is_fuchsia) { deps += [ "//garnet/public/lib/fsl" ] } else { - deps += [ "//flutter/fml" ] + deps += [ "$flutter_root/fml" ] } } diff --git a/sky/engine/wtf/BUILD.gn b/sky/engine/wtf/BUILD.gn index d5e74a91f23d5..76e7ae5695f86 100644 --- a/sky/engine/wtf/BUILD.gn +++ b/sky/engine/wtf/BUILD.gn @@ -187,12 +187,13 @@ source_set("wtf") { configs += [ ":clang_warnings", - "//flutter/sky/engine:config", - "//flutter/sky/engine:non_test_config", + "$flutter_root/sky/engine:config", + "$flutter_root/sky/engine:non_test_config", ] public_configs = [ - "//flutter/common:flutter_config", + "$flutter_root/common:flutter_config", + "$flutter_root:config", "//third_party/icu:icu_config", ] @@ -202,7 +203,7 @@ source_set("wtf") { ] deps = [ - "//flutter/glue", + "$flutter_root/glue", ] if (is_android) { @@ -248,14 +249,14 @@ executable("wtf_unittests") { configs += [ ":clang_warnings", - "//flutter/sky/engine:config", + "$flutter_root/sky/engine:config", ] deps = [ ":wtf", "//dart/runtime:libdart_jit", - # Does not use //flutter/testing because it needs and provides its own main + # Does not use $flutter_root/testing because it needs and provides its own main # function in RunAllTests.cpp. "//third_party/gtest", ] diff --git a/sky/packages/BUILD.gn b/sky/packages/BUILD.gn index 99236eaddc526..f9dd45cd921a1 100644 --- a/sky/packages/BUILD.gn +++ b/sky/packages/BUILD.gn @@ -6,8 +6,8 @@ group("packages") { testonly = true deps = [ - "//flutter/sky/packages/flutter_services", - "//flutter/sky/packages/sky_engine", - "//flutter/sky/packages/sky_services", + "$flutter_root/sky/packages/flutter_services", + "$flutter_root/sky/packages/sky_engine", + "$flutter_root/sky/packages/sky_services", ] } diff --git a/sky/packages/flutter_services/BUILD.gn b/sky/packages/flutter_services/BUILD.gn index ec5a29c403765..f326037901b3d 100644 --- a/sky/packages/flutter_services/BUILD.gn +++ b/sky/packages/flutter_services/BUILD.gn @@ -4,6 +4,6 @@ group("flutter_services") { deps = [ - "//flutter/sky/packages/sky_services", + "$flutter_root/sky/packages/sky_services", ] } diff --git a/sky/packages/sky_engine/BUILD.gn b/sky/packages/sky_engine/BUILD.gn index 2243e0f99cad6..b2c91bb3fd6f5 100644 --- a/sky/packages/sky_engine/BUILD.gn +++ b/sky/packages/sky_engine/BUILD.gn @@ -14,9 +14,9 @@ import("//dart/sdk/lib/isolate/isolate_sources.gni") import("//dart/sdk/lib/math/math_sources.gni") import("//dart/sdk/lib/typed_data/typed_data_sources.gni") -import("//flutter/build/dart/rules.gni") -import("//flutter/lib/ui/dart_ui.gni") -import("//flutter/sky/engine/core/core.gni") +import("$flutter_root/build/dart/rules.gni") +import("$flutter_root/lib/ui/dart_ui.gni") +import("$flutter_root/sky/engine/core/core.gni") if (!is_fuchsia) { copy("copy_sky_engine_authors") { diff --git a/sky/packages/sky_services/BUILD.gn b/sky/packages/sky_services/BUILD.gn index 0688479a117a9..44132cc252183 100644 --- a/sky/packages/sky_services/BUILD.gn +++ b/sky/packages/sky_services/BUILD.gn @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//flutter/build/dart/rules.gni") +import("$flutter_root/build/dart/rules.gni") if (!is_fuchsia) { copy("copy_sky_services_license") { diff --git a/synchronization/BUILD.gn b/synchronization/BUILD.gn index 82bee1c2b5a64..1615e3b236f40 100644 --- a/synchronization/BUILD.gn +++ b/synchronization/BUILD.gn @@ -11,8 +11,12 @@ source_set("synchronization") { "semaphore.h", ] + public_configs = [ + "$flutter_root:config", + ] + public_deps = [ - "//flutter/glue", + "$flutter_root/glue", "//garnet/public/lib/fxl", ] } @@ -26,7 +30,7 @@ executable("synchronization_unittests") { deps = [ ":synchronization", - "//flutter/testing", + "$flutter_root/testing", "//dart/runtime:libdart_jit", ] } diff --git a/testing/BUILD.gn b/testing/BUILD.gn index 0740ad43876be..f95b9d68506a9 100644 --- a/testing/BUILD.gn +++ b/testing/BUILD.gn @@ -6,10 +6,14 @@ source_set("testing") { testonly = true sources = [ - "//flutter/testing/run_all_unittests.cc", + "$flutter_root/testing/run_all_unittests.cc", ] public_deps = [ "//third_party/gtest", ] + + public_configs = [ + "$flutter_root:config", + ] } diff --git a/third_party/txt/BUILD.gn b/third_party/txt/BUILD.gn index eed185baf2623..88b2354cf7250 100644 --- a/third_party/txt/BUILD.gn +++ b/third_party/txt/BUILD.gn @@ -128,7 +128,7 @@ source_set("txt") { txt_common_executable_deps = [ "//dart/runtime:libdart_jit", # For logging. - "//flutter/fml", # For ICU initialization. + "$flutter_root/fml", # For ICU initialization. ] executable("txt_unittests") { diff --git a/vulkan/BUILD.gn b/vulkan/BUILD.gn index 1f69c32f180cc..1ab1cffcee54e 100644 --- a/vulkan/BUILD.gn +++ b/vulkan/BUILD.gn @@ -65,6 +65,7 @@ source_set("vulkan") { public_configs = [ ":vulkan_config", + "$flutter_root:config", "//third_party/skia:skia_private", ] }