提交 b03af318 编写于 作者: C Chinmay Garde 提交者: GitHub

Re-format all GN files using `gn format`. (#3319)

上级 847ee8d7
......@@ -5,7 +5,9 @@
group("flutter") {
testonly = true
deps = [ "//flutter/sky" ]
deps = [
"//flutter/sky",
]
if (is_fuchsia) {
deps += [
......@@ -29,7 +31,6 @@ group("flutter") {
}
if (!is_fuchsia) {
group("dist") {
testonly = true
......@@ -37,5 +38,4 @@ if (!is_fuchsia) {
"//flutter/sky/dist",
]
}
}
......@@ -204,9 +204,8 @@ template("dart_packages") {
}
# Determine list of packages.
list_script = rebase_path("build/dart/dart/tools/fetch_dart_packages.py",
".",
"//")
list_script =
rebase_path("build/dart/dart/tools/fetch_dart_packages.py", ".", "//")
packages = exec_script(list_script,
[
"--directory",
......
......@@ -38,7 +38,13 @@ template("flutter_app") {
dart_package_name = target_name + "_dart_package"
dart_package(dart_package_name) {
forward_variables_from(invoker, [ "analysis_options", "deps", "disable_analysis", "source_dir" ])
forward_variables_from(invoker,
[
"analysis_options",
"deps",
"disable_analysis",
"source_dir",
])
if (defined(invoker.package_name)) {
package_name = invoker.package_name
} else {
......@@ -108,7 +114,6 @@ template("flutter_app") {
rebase_path(depfile_path),
"--build-output",
rebase_path(snapshot_path, root_build_dir),
]
deps = [
......@@ -160,7 +165,7 @@ template("flutter_app") {
if (defined(invoker.manifest)) {
args += [
"--manifest",
rebase_path(invoker.manifest)
rebase_path(invoker.manifest),
]
}
......
......@@ -20,7 +20,5 @@ source_set("common") {
"//lib/ftl",
]
public_configs = [
":flutter_config"
]
public_configs = [ ":flutter_config" ]
}
......@@ -28,8 +28,8 @@ executable("content_handler") {
"//apps/mozart/services/input",
"//apps/mozart/services/views",
"//apps/tracing/lib/trace:provider",
"//dart/runtime/vm:libdart_platform",
"//dart/runtime:libdart",
"//dart/runtime/vm:libdart_platform",
"//flutter/assets",
"//flutter/common",
"//flutter/flow",
......
......@@ -13,9 +13,7 @@ source_set("glue") {
]
if (is_fuchsia || is_fuchsia_host) {
sources += [
"stack_trace_fuchsia.cc",
]
sources += [ "stack_trace_fuchsia.cc" ]
public_deps = [
"//apps/tracing/lib/trace",
......@@ -27,8 +25,6 @@ source_set("glue") {
"task_runner_adaptor.h",
]
deps += [
"//base",
]
deps += [ "//base" ]
}
}
......@@ -39,15 +39,14 @@ action("generate_snapshot_bin") {
}
deps = [
"//dart/runtime/bin:gen_snapshot($dart_host_toolchain)",
":generate_dart_ui",
":generate_dart_jni",
":generate_dart_ui",
"//dart/runtime/bin:gen_snapshot($dart_host_toolchain)",
]
inputs = [
"//dart/runtime/tools/create_snapshot_bin.py",
snapshot_dart,
] + dart_ui_files
+ dart_jni_files
"//dart/runtime/tools/create_snapshot_bin.py",
snapshot_dart,
] + dart_ui_files + dart_jni_files
vm_isolate_snapshot = "$target_gen_dir/vm_isolate_snapshot.bin"
isolate_snapshot = "$target_gen_dir/isolate_snapshot.bin"
......
......@@ -2,10 +2,10 @@
# 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") # for flutter_aot
import("//flutter/common/config.gni") # for flutter_aot
if (target_os == "ios") {
import("//build/config/ios/ios_sdk.gni") # For use_ios_simulator
import("//build/config/ios/ios_sdk.gni") # For use_ios_simulator
}
dart_host_toolchain = host_toolchain
......
......@@ -4,10 +4,10 @@
source_set("ui") {
sources = [
"compositing/scene_builder.cc",
"compositing/scene_builder.h",
"compositing/scene.cc",
"compositing/scene.h",
"compositing/scene_builder.cc",
"compositing/scene_builder.h",
"dart_runtime_hooks.cc",
"dart_runtime_hooks.h",
"dart_ui.cc",
......@@ -57,12 +57,12 @@ source_set("ui") {
"text/text_box.h",
"ui_dart_state.cc",
"ui_dart_state.h",
"window/platform_message_response_dart.cc",
"window/platform_message_response_dart.h",
"window/platform_message_response.cc",
"window/platform_message_response.h",
"window/platform_message.cc",
"window/platform_message.h",
"window/platform_message_response.cc",
"window/platform_message_response.h",
"window/platform_message_response_dart.cc",
"window/platform_message_response_dart.h",
"window/pointer_data.cc",
"window/pointer_data.h",
"window/pointer_data_packet.cc",
......
......@@ -5,37 +5,44 @@
import("//flutter/common/config.gni")
vmservice_sources_gypi =
exec_script("//build/gypi_to_gn.py",
[ rebase_path("//dart/runtime/bin/vmservice/vmservice_sources.gypi") ],
"scope",
[ rebase_path("//dart/runtime/bin/vmservice/vmservice_sources.gypi") ])
exec_script(
"//build/gypi_to_gn.py",
[ rebase_path("//dart/runtime/bin/vmservice/vmservice_sources.gypi") ],
"scope",
[ rebase_path("//dart/runtime/bin/vmservice/vmservice_sources.gypi") ])
action("gen_embedded_resources_cc") {
script = "//dart/runtime/tools/create_resources.py"
output_file = "$target_gen_dir/embedded_resources.cc"
outputs = [ output_file ]
outputs = [
output_file,
]
inputs = rebase_path(vmservice_sources_gypi.sources,
"",
"//dart/runtime/bin/vmservice")
args = [
"--output",
rebase_path(output_file),
"--outer_namespace",
"flutter",
"--inner_namespace",
"runtime",
"--table_name",
"flutter_embedded_service_isolate",
"--root_prefix",
rebase_path("//dart/runtime/bin/"),
] + rebase_path(inputs)
"--output",
rebase_path(output_file),
"--outer_namespace",
"flutter",
"--inner_namespace",
"runtime",
"--table_name",
"flutter_embedded_service_isolate",
"--root_prefix",
rebase_path("//dart/runtime/bin/"),
] + rebase_path(inputs)
}
source_set("embedded_resources_cc") {
sources = [ "$target_gen_dir/embedded_resources.cc" ]
deps = [ ":gen_embedded_resources_cc" ]
sources = [
"$target_gen_dir/embedded_resources.cc",
]
deps = [
":gen_embedded_resources_cc",
]
}
source_set("runtime") {
......@@ -67,8 +74,9 @@ source_set("runtime") {
]
deps = [
"//dart/runtime/bin:embedded_dart_io",
":embedded_resources_cc",
"//dart/runtime:libdart",
"//dart/runtime/bin:embedded_dart_io",
"//flutter/assets",
"//flutter/common",
"//flutter/flow",
......@@ -80,7 +88,6 @@ source_set("runtime") {
"//lib/tonic",
"//third_party/rapidjson",
"//third_party/skia",
":embedded_resources_cc",
]
defines = []
......@@ -88,27 +95,21 @@ source_set("runtime") {
if (current_toolchain == host_toolchain) {
# Though the test font data is small, we dont want to add to the binary size
# on the device. We only add the same on the host test shells.
defines += ["EMBED_TEST_FONT_DATA=1"]
defines += [ "EMBED_TEST_FONT_DATA=1" ]
}
if (flutter_runtime_mode != "release") {
deps += [
"//lib/tonic/debugger",
]
deps += [ "//lib/tonic/debugger" ]
}
if (is_android) {
deps += [
"//flutter/lib/jni",
]
deps += [ "//flutter/lib/jni" ]
}
# On iOS (device), 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 (!is_ios || use_ios_simulator) {
deps += [
"//flutter/lib/snapshot",
]
deps += [ "//flutter/lib/snapshot" ]
}
}
......@@ -3,5 +3,7 @@
# found in the LICENSE file.
group("shell") {
deps = [ "platform" ]
deps = [
"platform",
]
}
......@@ -57,7 +57,7 @@ template("dart_embedder_resources") {
dart_embedder_resources("generate_embedder_diagnostic_server_resources_cc") {
inputs = [
"//flutter/shell/common/diagnostic/diagnostic_server.dart"
"//flutter/shell/common/diagnostic/diagnostic_server.dart",
]
root_prefix = "//flutter/shell/common/diagnostic/"
output = "$target_gen_dir/embedder_diagnostic_server_resources.cc"
......@@ -100,10 +100,11 @@ source_set("common") {
]
deps = [
":generate_embedder_diagnostic_server_resources_cc",
"//base",
"//base:i18n",
"//dart/runtime/vm:libdart_platform",
"//dart/runtime:libdart",
"//dart/runtime/vm:libdart_platform",
"//flutter/assets",
"//flutter/common",
"//flutter/flow",
......@@ -117,6 +118,5 @@ source_set("common") {
"//third_party/rapidjson",
"//third_party/skia",
"//third_party/skia:gpu",
":generate_embedder_diagnostic_server_resources_cc",
]
}
......@@ -4,11 +4,17 @@
group("platform") {
if (is_mac || is_ios) {
deps = [ "darwin" ]
deps = [
"darwin",
]
} else if (is_android) {
deps = [ "android" ]
deps = [
"android",
]
} else if (is_linux) {
deps = [ "linux" ]
deps = [
"linux",
]
} else {
assert(false, "Unknown/Unsupported platform.")
}
......
......@@ -38,6 +38,7 @@ shared_library("sky_shell") {
]
deps = [
":jni_headers",
"//base",
"//dart/runtime:libdart",
"//flutter/common",
......@@ -50,7 +51,6 @@ shared_library("sky_shell") {
"//flutter/vulkan",
"//lib/ftl",
"//third_party/skia",
":jni_headers",
]
ldflags = [
......@@ -78,6 +78,7 @@ android_library("java") {
"io/flutter/view/ResourceExtractor.java",
"io/flutter/view/ResourcePaths.java",
"io/flutter/view/VsyncWaiter.java",
# Deprecated classes provided for backwards compatibility
"org/domokit/sky/shell/SkyActivity.java",
"org/domokit/sky/shell/SkyApplication.java",
......@@ -113,9 +114,9 @@ android_apk("android") {
flutter_dist_jar = "$root_build_dir/flutter.jar"
deps = [
"//base:base_java",
":assets",
":java",
":sky_shell",
"//base:base_java",
]
}
......@@ -10,15 +10,15 @@ source_set("mac_desktop_platform") {
visibility = [ ":*" ]
sources = [
"main_mac.mm",
"platform_view_mac.h",
"platform_view_mac.mm",
"flutter_app_delegate.h",
"flutter_app_delegate.m",
"flutter_application.h",
"flutter_application.mm",
"flutter_window.h",
"flutter_window.mm",
"main_mac.mm",
"platform_view_mac.h",
"platform_view_mac.mm",
"vsync_waiter_mac.cc",
"vsync_waiter_mac.h",
]
......@@ -47,9 +47,7 @@ executable("shell_standalone") {
resource_copy_mac("mac_desktop_resources") {
app_name = "SkyShell"
resources = [
"//third_party/icu/android/icudtl.dat",
]
resources = [ "//third_party/icu/android/icudtl.dat" ]
bundle_directory = "."
}
......
......@@ -23,13 +23,9 @@ shared_library("flutter_framework_dylib") {
"framework/Headers/FlutterMacros.h",
"framework/Headers/FlutterMessageListener.h",
"framework/Headers/FlutterViewController.h",
"framework/Source/accessibility_bridge.h",
"framework/Source/accessibility_bridge.mm",
"framework/Source/flutter_touch_mapper.h",
"framework/Source/flutter_touch_mapper.mm",
"framework/Source/FlutterAppDelegate.mm",
"framework/Source/FlutterDartProject_Internal.h",
"framework/Source/FlutterDartProject.mm",
"framework/Source/FlutterDartProject_Internal.h",
"framework/Source/FlutterDartSource.h",
"framework/Source/FlutterDartSource.mm",
"framework/Source/FlutterJSONMessageListener.mm",
......@@ -41,6 +37,10 @@ shared_library("flutter_framework_dylib") {
"framework/Source/FlutterView.h",
"framework/Source/FlutterView.mm",
"framework/Source/FlutterViewController.mm",
"framework/Source/accessibility_bridge.h",
"framework/Source/accessibility_bridge.mm",
"framework/Source/flutter_touch_mapper.h",
"framework/Source/flutter_touch_mapper.mm",
"framework/Source/platform_message_router.h",
"framework/Source/platform_message_router.mm",
"framework/Source/vsync_waiter_ios.h",
......@@ -49,7 +49,6 @@ shared_library("flutter_framework_dylib") {
"platform_view_ios.mm",
]
deps = [
"//base:base",
"//dart/runtime:libdart",
......@@ -65,9 +64,7 @@ shared_library("flutter_framework_dylib") {
"//third_party/skia",
]
defines = [
"FLUTTER_FRAMEWORK"
]
defines = [ "FLUTTER_FRAMEWORK" ]
libs = [
"UIKit.framework",
......@@ -80,8 +77,12 @@ shared_library("flutter_framework_dylib") {
copy("framework_dylib") {
visibility = [ ":*" ]
sources = [ "$root_out_dir/libFlutter.dylib" ]
outputs = [ "$_flutter_framework_dir/Flutter" ]
sources = [
"$root_out_dir/libFlutter.dylib",
]
outputs = [
"$_flutter_framework_dir/Flutter",
]
deps = [
":flutter_framework_dylib",
......@@ -93,8 +94,12 @@ action("framework_install_name") {
stamp_file = "$root_out_dir/flutter_install_name_stamp"
script = "//flutter/sky/tools/change_install_name.py"
inputs = [ "$_flutter_framework_dir/Flutter" ]
outputs = [ stamp_file ]
inputs = [
"$_flutter_framework_dir/Flutter",
]
outputs = [
stamp_file,
]
args = [
"--dylib",
......@@ -106,20 +111,28 @@ action("framework_install_name") {
]
deps = [
":framework_dylib"
":framework_dylib",
]
}
copy("framework_info_plist") {
visibility = [ ":*" ]
sources = [ "framework/Info.plist" ]
outputs = [ "$_flutter_framework_dir/Info.plist" ]
sources = [
"framework/Info.plist",
]
outputs = [
"$_flutter_framework_dir/Info.plist",
]
}
copy("framework_module_map") {
visibility = [ ":*" ]
sources = [ "framework/module.modulemap" ]
outputs = [ "$_flutter_framework_dir/Modules/module.modulemap" ]
sources = [
"framework/module.modulemap",
]
outputs = [
"$_flutter_framework_dir/Modules/module.modulemap",
]
}
copy("framework_headers") {
......@@ -134,7 +147,9 @@ copy("framework_headers") {
"framework/Headers/FlutterMessageListener.h",
"framework/Headers/FlutterViewController.h",
]
outputs = [ "$_flutter_framework_dir/Headers/{{source_file_part}}" ]
outputs = [
"$_flutter_framework_dir/Headers/{{source_file_part}}",
]
}
copy("framework_icu") {
......@@ -144,7 +159,9 @@ copy("framework_icu") {
"//third_party/icu/android/icudtl.dat",
]
set_sources_assignment_filter(sources_assignment_filter)
outputs = [ "$_flutter_framework_dir/{{source_file_part}}" ]
outputs = [
"$_flutter_framework_dir/{{source_file_part}}",
]
}
group("flutter_framework") {
......
......@@ -20,14 +20,13 @@ executable("linux") {
"//flutter/shell/gpu",
"//flutter/shell/testing",
"//lib/ftl",
"//third_party/glfw",
"//third_party/skia",
# Required by FontCacheLinux. Not Skia. Skia uses a custom font manager
# that delegates to us.
"//third_party:fontconfig",
"//third_party/glfw",
"//third_party/skia",
]
ldflags = [
"-lGL",
]
ldflags = [ "-lGL" ]
}
......@@ -9,8 +9,12 @@ if (is_android) {
source = "//flutter/sky/packages/flutter_services"
dest = "$root_build_dir/dist/packages/flutter_services"
inputs = [ source ]
outputs = [ dest ]
inputs = [
source,
]
outputs = [
dest,
]
args = [
"--source",
......@@ -29,8 +33,12 @@ if (is_android) {
source = "$root_gen_dir/dart-pkg/sky_engine"
dest = "$root_build_dir/dist/packages/sky_engine"
inputs = [ source ]
outputs = [ dest ]
inputs = [
source,
]
outputs = [
dest,
]
args = [
"--source",
......@@ -51,8 +59,12 @@ if (is_android) {
source = "$root_gen_dir/dart-pkg/sky_services"
dest = "$root_build_dir/dist/packages/sky_services"
inputs = [ source ]
outputs = [ dest ]
inputs = [
source,
]
outputs = [
dest,
]
args = [
"--source",
......
......@@ -19,15 +19,11 @@ config("config") {
"$root_out_dir",
]
cflags = [
"-Wno-inconsistent-missing-override",
]
cflags = [ "-Wno-inconsistent-missing-override" ]
if (is_fuchsia) {
# TODO(abarth): Remove once the kernel support unmapping memory properly.
defines = [
"MEMORY_TOOL_REPLACES_ALLOCATOR",
]
defines = [ "MEMORY_TOOL_REPLACES_ALLOCATOR" ]
}
}
......@@ -42,9 +38,7 @@ config("non_test_config") {
}
group("engine") {
public_configs = [
":config",
]
public_configs = [ ":config" ]
public_deps = [
"//flutter/sky/engine/core",
......
......@@ -5,7 +5,10 @@
import("//flutter/common/config.gni")
import("//flutter/sky/engine/core/core.gni")
visibility = [ "//flutter/sky/engine/*", "//flutter/sky/shell/*" ]
visibility = [
"//flutter/sky/engine/*",
"//flutter/sky/shell/*",
]
static_library("core") {
output_name = "sky_core"
......@@ -20,9 +23,7 @@ static_library("core") {
if (flutter_runtime_mode != "release" && !is_fuchsia) {
# Only include observatory assets in non-release modes.
deps += [
"//dart/runtime/observatory:embedded_observatory_archive",
]
deps += [ "//dart/runtime/observatory:embedded_observatory_archive" ]
}
configs += [
......@@ -45,20 +46,14 @@ static_library("core") {
]
if (!is_fuchsia) {
public_deps += [
"//base",
]
public_deps += [ "//base" ]
}
if (flutter_runtime_mode != "release") {
public_deps += [
"//lib/tonic/debugger",
]
public_deps += [ "//lib/tonic/debugger" ]
}
if (is_android) {
public_deps += [
"//flutter/lib/jni",
]
public_deps += [ "//flutter/lib/jni" ]
}
}
......@@ -273,15 +273,11 @@ source_set("platform") {
}
if (is_android) {
sources += [
"fonts/android/FontCacheAndroid.cpp",
]
sources += [ "fonts/android/FontCacheAndroid.cpp" ]
}
if (is_linux && !is_android) {
sources += [
"fonts/linux/FontCacheLinux.cpp",
]
sources += [ "fonts/linux/FontCacheLinux.cpp" ]
}
if (is_fuchsia) {
......@@ -290,9 +286,7 @@ source_set("platform") {
"fonts/fuchsia/FontCacheFuchsia.h",
]
deps += [
"//apps/fonts/services",
]
deps += [ "//apps/fonts/services" ]
}
configs += [
......@@ -310,9 +304,7 @@ source_set("platform") {
if (is_android) {
# Add in some Linux files also shared with Android.
set_sources_assignment_filter([])
sources += [
"fonts/linux/FontPlatformDataLinux.cpp",
]
sources += [ "fonts/linux/FontPlatformDataLinux.cpp" ]
set_sources_assignment_filter(sources_assignment_filter)
}
}
......@@ -19,8 +19,6 @@ source_set("web") {
]
if (is_fuchsia) {
deps += [
"//lib/mtl/tasks",
]
deps += [ "//lib/mtl/tasks" ]
}
}
......@@ -227,6 +227,7 @@ executable("wtf_unittests") {
"StringExtrasTest.cpp",
"StringHasherTest.cpp",
"TemporaryChangeTest.cpp",
"VectorTest.cpp",
"testing/RunAllTests.cpp",
"testing/WTFTestHelpers.cpp",
"testing/WTFTestHelpers.h",
......@@ -238,7 +239,6 @@ executable("wtf_unittests") {
"text/StringImplTest.cpp",
"text/StringOperatorsTest.cpp",
"text/TextCodecUTF8Test.cpp",
"VectorTest.cpp",
# The following tests depend on either ICU or the locale. Disable them for
# now.
......@@ -253,6 +253,7 @@ executable("wtf_unittests") {
deps = [
":wtf",
# Does not use //flutter/testing because it needs and provides its own main
# function in RunAllTests.cpp.
"//third_party/gtest",
......
......@@ -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/sky/packages/flutter_services",
]
}
......@@ -3,5 +3,7 @@
# found in the LICENSE file.
group("flutter_services") {
deps = [ "//flutter/sky/packages/sky_services" ]
deps = [
"//flutter/sky/packages/sky_services",
]
}
......@@ -103,11 +103,11 @@ group("copy_dart_sdk") {
dart_pkg("sky_engine") {
sources = [
"LICENSE",
"README.md",
"dart_sdk/_empty.dart",
"lib/_embedder.yaml",
"README.md",
"pubspec.yaml",
"LICENSE"
]
deps = [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册