Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / build / secondary / third_party / android_tools / BUILD.gn
bloba6b375893426d670c9dd4778010028c709cfcc32
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 android_java_prebuilt("android_support_v13_java") {
53   jar_path =
54       "$android_sdk_root/extras/android/support/v13/android-support-v13.jar"
57 android_resources("android_support_v7_appcompat_resources") {
58   v14_skip = true
59   resource_dirs =
60       [ "$android_sdk_root/extras/android/support/v7/appcompat/res" ]
61   custom_package = "android.support.v7.appcompat"
64 android_java_prebuilt("android_support_v7_appcompat_java") {
65   deps = [
66     ":android_support_v7_appcompat_resources",
67   ]
68   jar_path = "$android_sdk_root/extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar"
71 android_resources("android_support_v7_mediarouter_resources") {
72   v14_skip = true
73   resource_dirs =
74       [ "$android_sdk_root/extras/android/support/v7/mediarouter/res" ]
75   deps = [
76     ":android_support_v7_appcompat_resources",
77   ]
78   custom_package = "android.support.v7.mediarouter"
81 android_java_prebuilt("android_support_v7_mediarouter_java") {
82   deps = [
83     ":android_support_v7_mediarouter_resources",
84     ":android_support_v7_appcompat_java",
85   ]
86   jar_path = "$android_sdk_root/extras/android/support/v7/mediarouter/libs/android-support-v7-mediarouter.jar"
89 android_resources("android_support_v7_recyclerview_resources") {
90   v14_skip = true
91   resource_dirs =
92       [ "$android_sdk_root/extras/android/support/v7/recyclerview/res" ]
93   custom_package = "android.support.v7.recyclerview"
96 android_java_prebuilt("android_support_v7_recyclerview_java") {
97   deps = [
98     ":android_support_v7_appcompat_java",
99     ":android_support_v7_recyclerview_resources",
100   ]
101   jar_path = "$android_sdk_root/extras/android/support/v7/recyclerview/libs/android-support-v7-recyclerview.jar"
104 android_resources("google_play_services_default_resources") {
105   v14_skip = true
106   resource_dirs = [ "$android_sdk_root/extras/google/google_play_services/libproject/google-play-services_lib/res" ]
107   custom_package = "com.google.android.gms"
108   deps = [
109     ":check_sdk_extras_version",
110   ]
112 android_java_prebuilt("google_play_services_default_java") {
113   deps = [
114     ":android_support_v13_java",
115     ":android_support_v7_mediarouter_java",
116     ":google_play_services_default_resources",
117     ":legacy_http_javalib",
118   ]
119   proguard_preprocess = true
120   proguard_config = "//third_party/android_tools/proguard.flags"
122   # TODO(dgn) deps should not complain about having a custom action here
123   # Currently, there is no guarantee that the data_deps actions will complete before the current one runs
124   data_deps = [ ":check_sdk_extras_version" ]
125   jar_path = "$android_sdk_root/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar"
128 action("check_sdk_extras_version") {
129   script = "//build/check_sdk_extras_version.py"
130   args = [
131     "--package-id",
132     "extra-google-google_play_services",
133     "--package-location",
134     rebase_path("$android_sdk_root/extras/google/google_play_services"),
135     "--stamp",
136     rebase_path("$target_gen_dir/checked_sdk_extras_version.stamp"),
137   ]
138   inputs = [
139     "//build/android_sdk_extras.json",
140     "$android_sdk_root/extras/google/google_play_services/source.properties",
141   ]
142   outputs = [
143     "$target_gen_dir/checked_sdk_extras_version.stamp",
144   ]
147 # TODO(jbudorick): Remove this once net_java_test_support no longer needs it.
148 android_java_prebuilt("legacy_http_javalib") {
149   jar_path = "$android_sdk/optional/org.apache.http.legacy.jar"