summaryrefslogtreecommitdiffstats
path: root/build/secondary/third_party/android_tools/BUILD.gn
diff options
context:
space:
mode:
authorscottmg <scottmg@chromium.org>2014-12-01 16:25:20 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-02 00:25:35 +0000
commitb199254f481c5db36d56e83fce40594b06d2b81f (patch)
tree750cbec5b7f5e15d78cddb158b856012a20f49c5 /build/secondary/third_party/android_tools/BUILD.gn
parentfb49bffb2e0bd0f9a9e0ee5982d6a0ecf5b1dc6f (diff)
downloadchromium_src-b199254f481c5db36d56e83fce40594b06d2b81f.zip
chromium_src-b199254f481c5db36d56e83fce40594b06d2b81f.tar.gz
chromium_src-b199254f481c5db36d56e83fce40594b06d2b81f.tar.bz2
gn format //build
A starting point for doing all of src, and adding a PRESUBMIT. Includes https://codereview.chromium.org/772663002/ and https://codereview.chromium.org/770053002/. I haven't pushed new binaries yet. Generated via: > cd build > git ls-files *.gn *.gni | sed -e "s/^/@..\\\\out\\\\Debug\\\\gn format --in-place /" >x.bat && x.bat The only things that I don't love in the current output are: 1. Turning args = [ "--depfile", rebase_path(depfile, root_build_dir), "--android-sdk-tools", rebased_android_sdk_build_tools, "--dex-path", rebased_output, ] into: args = [ "--depfile", rebase_path(depfile, root_build_dir), "--android-sdk-tools", rebased_android_sdk_build_tools, "--dex-path", rebased_output, ] The heuristic for this isn't trivial though, and it also affects e.g. '-Xclang' in cflags, as well as assignments to temporaries that are later assigned to args. 2. Turning single line if (defined(invoker.inputs)) { inputs = invoker.inputs } into if (defined(invoker.inputs)) { inputs = invoker.inputs } This could be argued to be an improvement, but as it's very boilerplate-y perhaps an exception to allow single line in this case is worthwhile. I think there was discussion of new syntax for this case too, something like "inputs ?= invoker.inputs" maybe. In both cases, I think it's worthwhile to get formatting turned on, and then go back and special case these if we decide it's worthwhile. R=brettw@chromium.org BUG=348474 Review URL: https://codereview.chromium.org/766573003 Cr-Commit-Position: refs/heads/master@{#306305}
Diffstat (limited to 'build/secondary/third_party/android_tools/BUILD.gn')
-rw-r--r--build/secondary/third_party/android_tools/BUILD.gn27
1 files changed, 16 insertions, 11 deletions
diff --git a/build/secondary/third_party/android_tools/BUILD.gn b/build/secondary/third_party/android_tools/BUILD.gn
index 14e6c07..0df6545 100644
--- a/build/secondary/third_party/android_tools/BUILD.gn
+++ b/build/secondary/third_party/android_tools/BUILD.gn
@@ -11,7 +11,9 @@ config("cpu_features_include") {
# This is the GN version of
# //build/android/cpufeatures.gypi:cpufeatures
source_set("cpu_features") {
- sources = [ "ndk/sources/android/cpufeatures/cpu-features.c" ]
+ sources = [
+ "ndk/sources/android/cpufeatures/cpu-features.c",
+ ]
public_configs = [ ":cpu_features_include" ]
configs -= [ "//build/config/compiler:chromium_code" ]
@@ -27,27 +29,29 @@ android_java_prebuilt("uiautomator_java") {
}
android_java_prebuilt("android_support_v13_java") {
- jar_path = "$android_sdk_root/extras/android/support/v13/android-support-v13.jar"
+ jar_path =
+ "$android_sdk_root/extras/android/support/v13/android-support-v13.jar"
}
android_resources("android_support_v7_appcompat_resources") {
v14_verify_only = true
- resource_dirs = [
- "$android_sdk_root/extras/android/support/v7/appcompat/res"
- ]
+ resource_dirs =
+ [ "$android_sdk_root/extras/android/support/v7/appcompat/res" ]
custom_package = "android.support.v7.appcompat"
}
android_java_prebuilt("android_support_v7_appcompat_java") {
- deps = [ ":android_support_v7_appcompat_resources" ]
- jar_path = "$android_sdk_root/extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar"
+ deps = [
+ ":android_support_v7_appcompat_resources",
+ ]
+ jar_path =
+ "$android_sdk_root/extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar"
}
android_resources("android_support_v7_mediarouter_resources") {
v14_verify_only = true
- resource_dirs = [
- "$android_sdk_root/extras/android/support/v7/mediarouter/res"
- ]
+ resource_dirs =
+ [ "$android_sdk_root/extras/android/support/v7/mediarouter/res" ]
deps = [
":android_support_v7_appcompat_resources",
]
@@ -59,5 +63,6 @@ android_java_prebuilt("android_support_v7_mediarouter_java") {
":android_support_v7_mediarouter_resources",
":android_support_v7_appcompat_java",
]
- jar_path = "$android_sdk_root/extras/android/support/v7/mediarouter/libs/android-support-v7-mediarouter.jar"
+ jar_path =
+ "$android_sdk_root/extras/android/support/v7/mediarouter/libs/android-support-v7-mediarouter.jar"
}