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") {
15 "ndk/sources/android/cpufeatures/cpu-features.c",
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") {
37 resource_dirs = [ "$android_sdk_root/extras/android/support/design/res" ]
39 ":android_support_v7_appcompat_resources",
41 custom_package = "android.support.design"
44 android_java_prebuilt("android_support_design_java") {
46 ":android_support_v7_appcompat_java",
47 ":android_support_design_resources",
49 jar_path = "$android_sdk_root/extras/android/support/design/libs/android-support-design.jar"
52 android_java_prebuilt("android_support_v13_java") {
54 "$android_sdk_root/extras/android/support/v13/android-support-v13.jar"
57 android_resources("android_support_v7_appcompat_resources") {
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") {
66 ":android_support_v7_appcompat_resources",
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") {
74 [ "$android_sdk_root/extras/android/support/v7/mediarouter/res" ]
76 ":android_support_v7_appcompat_resources",
78 custom_package = "android.support.v7.mediarouter"
81 android_java_prebuilt("android_support_v7_mediarouter_java") {
83 ":android_support_v7_mediarouter_resources",
84 ":android_support_v7_appcompat_java",
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") {
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") {
98 ":android_support_v7_appcompat_java",
99 ":android_support_v7_recyclerview_resources",
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") {
106 resource_dirs = [ "$android_sdk_root/extras/google/google_play_services/libproject/google-play-services_lib/res" ]
107 custom_package = "com.google.android.gms"
109 ":check_sdk_extras_version",
112 android_java_prebuilt("google_play_services_default_java") {
114 ":android_support_v13_java",
115 ":android_support_v7_mediarouter_java",
116 ":google_play_services_default_resources",
117 ":legacy_http_javalib",
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"
132 "extra-google-google_play_services",
133 "--package-location",
134 rebase_path("$android_sdk_root/extras/google/google_play_services"),
136 rebase_path("$target_gen_dir/checked_sdk_extras_version.stamp"),
139 "//build/android_sdk_extras.json",
140 "$android_sdk_root/extras/google/google_play_services/source.properties",
143 "$target_gen_dir/checked_sdk_extras_version.stamp",
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"