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 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") {
59 "$android_sdk_root/extras/android/support/v13/android-support-v13.jar"
62 android_resources("android_support_v7_appcompat_resources") {
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") {
71 ":android_support_v7_appcompat_resources",
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") {
79 [ "$android_sdk_root/extras/android/support/v7/mediarouter/res" ]
81 ":android_support_v7_appcompat_resources",
83 custom_package = "android.support.v7.mediarouter"
86 android_java_prebuilt("android_support_v7_mediarouter_java") {
88 ":android_support_v7_mediarouter_resources",
89 ":android_support_v7_appcompat_java",
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") {
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") {
103 ":android_support_v7_appcompat_java",
104 ":android_support_v7_recyclerview_resources",
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") {
111 resource_dirs = [ "$android_sdk_root/extras/google/google_play_services/libproject/google-play-services_lib/res" ]
112 custom_package = "com.google.android.gms"
114 ":check_sdk_extras_version",
117 android_java_prebuilt("google_play_services_default_java") {
119 ":android_support_v13_java",
120 ":android_support_v7_mediarouter_java",
121 ":google_play_services_default_resources",
122 ":legacy_http_javalib",
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"
137 "extra-google-google_play_services",
138 "--package-location",
139 rebase_path("$android_sdk_root/extras/google/google_play_services"),
141 rebase_path("$target_gen_dir/checked_sdk_extras_version.stamp"),
144 "//build/android_sdk_extras.json",
145 "$android_sdk_root/extras/google/google_play_services/source.properties",
148 "$target_gen_dir/checked_sdk_extras_version.stamp",
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"