Skip to content

Commit

Permalink
Re-format all GN files using gn format. (flutter#3319)
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaygarde authored Jan 3, 2017
1 parent 847ee8d commit b03af31
Show file tree
Hide file tree
Showing 26 changed files with 166 additions and 151 deletions.
6 changes: 3 additions & 3 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
group("flutter") {
testonly = true

deps = [ "//flutter/sky" ]
deps = [
"//flutter/sky",
]

if (is_fuchsia) {
deps += [
Expand All @@ -29,13 +31,11 @@ group("flutter") {
}

if (!is_fuchsia) {

group("dist") {
testonly = true

deps = [
"//flutter/sky/dist",
]
}

}
5 changes: 2 additions & 3 deletions build/dart/rules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 8 additions & 3 deletions build/flutter_app.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -108,7 +114,6 @@ template("flutter_app") {
rebase_path(depfile_path),
"--build-output",
rebase_path(snapshot_path, root_build_dir),

]

deps = [
Expand Down Expand Up @@ -160,7 +165,7 @@ template("flutter_app") {
if (defined(invoker.manifest)) {
args += [
"--manifest",
rebase_path(invoker.manifest)
rebase_path(invoker.manifest),
]
}

Expand Down
4 changes: 1 addition & 3 deletions common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@ source_set("common") {
"//lib/ftl",
]

public_configs = [
":flutter_config"
]
public_configs = [ ":flutter_config" ]
}
2 changes: 1 addition & 1 deletion content_handler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 2 additions & 6 deletions glue/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -27,8 +25,6 @@ source_set("glue") {
"task_runner_adaptor.h",
]

deps += [
"//base",
]
deps += [ "//base" ]
}
}
11 changes: 5 additions & 6 deletions lib/snapshot/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions lib/snapshot/toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions lib/ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
61 changes: 31 additions & 30 deletions runtime/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -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",
Expand All @@ -80,35 +88,28 @@ source_set("runtime") {
"//lib/tonic",
"//third_party/rapidjson",
"//third_party/skia",
":embedded_resources_cc",
]

defines = []

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" ]
}
}
4 changes: 3 additions & 1 deletion shell/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
# found in the LICENSE file.

group("shell") {
deps = [ "platform" ]
deps = [
"platform",
]
}
6 changes: 3 additions & 3 deletions shell/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand All @@ -117,6 +118,5 @@ source_set("common") {
"//third_party/rapidjson",
"//third_party/skia",
"//third_party/skia:gpu",
":generate_embedder_diagnostic_server_resources_cc",
]
}
12 changes: 9 additions & 3 deletions shell/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
Expand Down
5 changes: 3 additions & 2 deletions shell/platform/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ shared_library("sky_shell") {
]

deps = [
":jni_headers",
"//base",
"//dart/runtime:libdart",
"//flutter/common",
Expand All @@ -50,7 +51,6 @@ shared_library("sky_shell") {
"//flutter/vulkan",
"//lib/ftl",
"//third_party/skia",
":jni_headers",
]

ldflags = [
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
]
}
Loading

0 comments on commit b03af31

Please sign in to comment.