Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / build / secondary / third_party / android_tools / BUILD.gn
blob175409b497cb2a9db26a2f938bd2ba0d26d59931
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/android/rules.gni")
7 config("cpu_features_include") {
8   include_dirs = [ "ndk/sources/android/cpufeatures" ]
11 # This is the GN version of
12 # //build/android/ndk.gyp:cpu_features
13 source_set("cpu_features") {
14   sources = [
15     "ndk/sources/android/cpufeatures/cpu-features.c",
16   ]
17   public_configs = [ ":cpu_features_include" ]
19   configs -= [ "//build/config/compiler:chromium_code" ]
20   configs += [ "//build/config/compiler:no_chromium_code" ]
23 android_library("preview_java_sources") {
24   DEPRECATED_java_in_dir = "$android_sdk_root/sources/preview_sources/src"
27 android_java_prebuilt("android_gcm_java") {
28   jar_path = "$android_sdk_root/extras/google/gcm/gcm-client/dist/gcm.jar"
31 android_java_prebuilt("uiautomator_java") {
32   jar_path = "$android_sdk/uiautomator.jar"
35 android_resources("android_support_design_resources") {
36   v14_skip = true
37   resource_dirs = [ "$android_sdk_root/extras/android/support/design/res" ]
38   deps = [
39     ":android_support_v7_appcompat_resources",
40   ]
41   custom_package = "android.support.design"
44 android_java_prebuilt("android_support_design_java") {
45   deps = [
46     ":android_support_v7_appcompat_java",
47     ":android_support_design_resources",
48   ]
49   jar_path = "$android_sdk_root/extras/android/support/design/libs/android-support-design.jar"
52 java_prebuilt("android_support_multidex_java") {
53   supports_android = true
54   jar_path = "$android_sdk_root/extras/android/support/multidex/library/libs/android-support-multidex.jar"
57 android_java_prebuilt("android_support_v13_java") {
58   jar_path =
59       "$android_sdk_root/extras/android/support/v13/android-support-v13.jar"
62 android_resources("android_support_v7_appcompat_resources") {
63   v14_skip = true
64   resource_dirs =
65       [ "$android_sdk_root/extras/android/support/v7/appcompat/res" ]
66   custom_package = "android.support.v7.appcompat"
69 android_java_prebuilt("android_support_v7_appcompat_java") {
70   deps = [
71     ":android_support_v7_appcompat_resources",
72   ]
73   jar_path = "$android_sdk_root/extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar"
76 android_resources("android_support_v7_mediarouter_resources") {
77   v14_skip = true
78   resource_dirs =
79       [ "$android_sdk_root/extras/android/support/v7/mediarouter/res" ]
80   deps = [
81     ":android_support_v7_appcompat_resources",
82   ]
83   custom_package = "android.support.v7.mediarouter"
86 android_java_prebuilt("android_support_v7_mediarouter_java") {
87   deps = [
88     ":android_support_v7_mediarouter_resources",
89     ":android_support_v7_appcompat_java",
90   ]
91   jar_path = "$android_sdk_root/extras/android/support/v7/mediarouter/libs/android-support-v7-mediarouter.jar"
94 android_resources("android_support_v7_recyclerview_resources") {
95   v14_skip = true
96   resource_dirs =
97       [ "$android_sdk_root/extras/android/support/v7/recyclerview/res" ]
98   custom_package = "android.support.v7.recyclerview"
101 android_java_prebuilt("android_support_v7_recyclerview_java") {
102   deps = [
103     ":android_support_v7_appcompat_java",
104     ":android_support_v7_recyclerview_resources",
105   ]
106   jar_path = "$android_sdk_root/extras/android/support/v7/recyclerview/libs/android-support-v7-recyclerview.jar"
109 android_resources("google_play_services_default_resources") {
110   v14_skip = true
111   resource_dirs = [ "$android_sdk_root/extras/google/google_play_services/libproject/google-play-services_lib/res" ]
112   custom_package = "com.google.android.gms"
113   deps = [
114     ":check_sdk_extras_version",
115   ]
117 android_java_prebuilt("google_play_services_default_java") {
118   deps = [
119     ":android_support_v13_java",
120     ":android_support_v7_mediarouter_java",
121     ":google_play_services_default_resources",
122     ":legacy_http_javalib",
123   ]
124   proguard_preprocess = true
125   proguard_config = "//third_party/android_tools/proguard.flags"
127   # TODO(dgn) deps should not complain about having a custom action here
128   # Currently, there is no guarantee that the data_deps actions will complete before the current one runs
129   data_deps = [ ":check_sdk_extras_version" ]
130   jar_path = "$android_sdk_root/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar"
133 action("check_sdk_extras_version") {
134   script = "//build/check_sdk_extras_version.py"
135   args = [
136     "--package-id",
137     "extra-google-google_play_services",
138     "--package-location",
139     rebase_path("$android_sdk_root/extras/google/google_play_services"),
140     "--stamp",
141     rebase_path("$target_gen_dir/checked_sdk_extras_version.stamp"),
142   ]
143   inputs = [
144     "//build/android_sdk_extras.json",
145     "$android_sdk_root/extras/google/google_play_services/source.properties",
146   ]
147   outputs = [
148     "$target_gen_dir/checked_sdk_extras_version.stamp",
149   ]
152 # TODO(jbudorick): Remove this once net_java_test_support no longer needs it.
153 android_java_prebuilt("legacy_http_javalib") {
154   jar_path = "$android_sdk/optional/org.apache.http.legacy.jar"