Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: build/secondary/third_party/android_tools/BUILD.gn

Issue 2156453002: Add AAR support to Chrome and convert support libraries to using AARs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert change in 3p/android_async_task/README.chromium Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/config/android/rules.gni ('k') | chrome/android/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/rules.gni") 5 import("//build/config/android/rules.gni")
6 6
7 config("cpu_features_include") { 7 config("cpu_features_include") {
8 include_dirs = [ "ndk/sources/android/cpufeatures" ] 8 include_dirs = [ "ndk/sources/android/cpufeatures" ]
9 } 9 }
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 configs -= [ "//build/config/compiler:chromium_code" ] 26 configs -= [ "//build/config/compiler:chromium_code" ]
27 configs += [ 27 configs += [
28 "//build/config/compiler:no_chromium_code", 28 "//build/config/compiler:no_chromium_code",
29 29
30 # Must be after no_chromium_code for warning flags to be ordered correctly. 30 # Must be after no_chromium_code for warning flags to be ordered correctly.
31 ":cpu_features_warnings", 31 ":cpu_features_warnings",
32 ] 32 ]
33 } 33 }
34 34
35 lib_version = "23.2.1"
36 lib_path = "$android_sdk_root/extras/android/m2repository/com/android/support"
37
35 android_java_prebuilt("android_gcm_java") { 38 android_java_prebuilt("android_gcm_java") {
36 jar_path = "$android_sdk_root/extras/google/gcm/gcm-client/dist/gcm.jar" 39 jar_path = "$android_sdk_root/extras/google/gcm/gcm-client/dist/gcm.jar"
37 } 40 }
38 41
39 android_java_prebuilt("emma_device") { 42 android_java_prebuilt("emma_device") {
40 jar_path = "$android_sdk_root/tools/lib/emma_device.jar" 43 jar_path = "$android_sdk_root/tools/lib/emma_device.jar"
41 } 44 }
42 45
43 android_resources("android_support_design_resources") { 46 android_aar_prebuilt("android_support_design_java") {
44 v14_skip = true
45 deps = [ 47 deps = [
46 ":android_support_v7_appcompat_resources", 48 ":android_support_v7_appcompat_java",
47 ] 49 ]
48 resource_dirs = [ "$android_sdk_root/extras/android/support/design/res" ] 50 lib_name = "design"
49 custom_package = "android.support.design" 51 aar_path = "$lib_path/$lib_name/$lib_version/$lib_name-$lib_version.aar"
50 } 52 }
51 53
52 android_java_prebuilt("android_support_design_java") { 54 android_aar_prebuilt("android_support_multidex_java") {
53 deps = [ 55 # TODO(jbudorick): remove requires_android after crbug.com/522043 is fixed.
54 ":android_support_design_resources", 56 requires_android = false
55 ] 57 aar_path = "$lib_path/multidex/1.0.1/multidex-1.0.1.aar"
56 jar_path = "$android_sdk_root/extras/android/support/design/libs/android-suppo rt-design.jar"
57 } 58 }
58 59
59 java_prebuilt("android_support_multidex_java") { 60 android_java_prebuilt("android_support_annotations_java") {
60 supports_android = true 61 lib_name = "support-annotations"
61 jar_path = "$android_sdk_root/extras/android/support/multidex/library/libs/and roid-support-multidex.jar" 62 jar_path = "$lib_path/$lib_name/$lib_version/$lib_name-$lib_version.jar"
62 } 63 }
63 64
64 android_java_prebuilt("android_support_v13_java") { 65 android_aar_prebuilt("android_support_v4_java") {
65 jar_path = 66 lib_name = "support-v4"
66 "$android_sdk_root/extras/android/support/v13/android-support-v13.jar" 67 aar_path = "$lib_path/$lib_name/$lib_version/$lib_name-$lib_version.aar"
67 } 68 }
68 69
69 android_resources("android_support_v7_appcompat_resources") { 70 android_aar_prebuilt("android_support_v13_java") {
70 v14_skip = true 71 deps = [
71 resource_dirs = 72 ":android_support_annotations_java",
72 [ "$android_sdk_root/extras/android/support/v7/appcompat/res" ] 73 ":android_support_v4_java",
73 custom_package = "android.support.v7.appcompat" 74 ]
75 lib_name = "support-v13"
76 aar_path = "$lib_path/$lib_name/$lib_version/$lib_name-$lib_version.aar"
74 } 77 }
75 78
76 android_java_prebuilt("android_support_v7_appcompat_java") { 79 android_aar_prebuilt("android_support_v7_appcompat_java_internal") {
77 deps = [ 80 lib_name = "appcompat-v7"
78 ":android_support_v7_appcompat_resources", 81 aar_path = "$lib_path/$lib_name/$lib_version/$lib_name-$lib_version.aar"
79 ]
80 jar_path = "$android_sdk_root/extras/android/support/v7/appcompat/libs/android -support-v7-appcompat.jar"
81 } 82 }
82 83
83 android_resources("android_support_v7_mediarouter_resources") { 84 java_group("android_support_v7_appcompat_java") {
84 v14_skip = true
85 resource_dirs =
86 [ "$android_sdk_root/extras/android/support/v7/mediarouter/res" ]
87 deps = [ 85 deps = [
88 ":android_support_v7_appcompat_resources", 86 ":android_support_v4_java",
87 ":android_support_v7_appcompat_java_internal",
89 ] 88 ]
90 custom_package = "android.support.v7.mediarouter"
91 } 89 }
92 90
93 android_java_prebuilt("android_support_v7_mediarouter_java") { 91 android_aar_prebuilt("android_support_v7_mediarouter_java") {
94 deps = [ 92 deps = [
95 ":android_support_v7_appcompat_java", 93 ":android_support_v7_appcompat_java",
96 ":android_support_v7_mediarouter_resources",
97 ] 94 ]
98 jar_path = "$android_sdk_root/extras/android/support/v7/mediarouter/libs/andro id-support-v7-mediarouter.jar" 95 lib_name = "mediarouter-v7"
96 aar_path = "$lib_path/$lib_name/$lib_version/$lib_name-$lib_version.aar"
99 } 97 }
100 98
101 android_resources("android_support_v7_recyclerview_resources") { 99 android_aar_prebuilt("android_support_v7_recyclerview_java") {
102 v14_skip = true
103 resource_dirs =
104 [ "$android_sdk_root/extras/android/support/v7/recyclerview/res" ]
105 custom_package = "android.support.v7.recyclerview"
106 }
107
108 android_java_prebuilt("android_support_v7_recyclerview_java") {
109 deps = [ 100 deps = [
110 ":android_support_v7_appcompat_java", 101 ":android_support_v7_appcompat_java",
111 ":android_support_v7_recyclerview_resources",
112 ] 102 ]
113 jar_path = "$android_sdk_root/extras/android/support/v7/recyclerview/libs/andr oid-support-v7-recyclerview.jar" 103 lib_name = "recyclerview-v7"
104 aar_path = "$lib_path/$lib_name/$lib_version/$lib_name-$lib_version.aar"
114 } 105 }
115 106
116 android_resources("google_play_services_default_resources") { 107 android_resources("google_play_services_default_resources") {
117 v14_skip = true 108 v14_skip = true
118 resource_dirs = [ "$android_sdk_root/extras/google/google_play_services/libpro ject/google-play-services_lib/res" ] 109 resource_dirs = [ "$android_sdk_root/extras/google/google_play_services/libpro ject/google-play-services_lib/res" ]
119 custom_package = "com.google.android.gms" 110 custom_package = "com.google.android.gms"
120 } 111 }
112
121 android_java_prebuilt("google_play_services_default_java") { 113 android_java_prebuilt("google_play_services_default_java") {
122 deps = [ 114 deps = [
123 ":android_support_v13_java", 115 ":android_support_annotations_java",
116 ":android_support_v4_java",
124 ":android_support_v7_mediarouter_java", 117 ":android_support_v7_mediarouter_java",
125 ":google_play_services_default_resources", 118 ":google_play_services_default_resources",
126 ] 119 ]
127 input_jars_paths = [ "$android_sdk/optional/org.apache.http.legacy.jar" ] 120 input_jars_paths = [ "$android_sdk/optional/org.apache.http.legacy.jar" ]
128 proguard_preprocess = true 121 proguard_preprocess = true
129 proguard_config = "//third_party/android_tools/proguard.flags" 122 proguard_config = "//third_party/android_tools/proguard.flags"
130 jar_path = "$android_sdk_root/extras/google/google_play_services/libproject/go ogle-play-services_lib/libs/google-play-services.jar" 123 jar_path = "$android_sdk_root/extras/google/google_play_services/libproject/go ogle-play-services_lib/libs/google-play-services.jar"
131 } 124 }
132 125
133 android_resources("android_support_v17_leanback_resources") { 126 android_aar_prebuilt("android_support_v17_leanback_java") {
134 v14_skip = true
135 resource_dirs =
136 [ "$android_sdk_root/extras/android/support/v17/leanback/res" ]
137 custom_package = "android.support.v17.leanback"
138 }
139
140 android_java_prebuilt("android_support_v17_leanback_java") {
141 deps = [ 127 deps = [
142 ":android_support_v17_leanback_resources",
143 ":android_support_v7_recyclerview_java", 128 ":android_support_v7_recyclerview_java",
144 ] 129 ]
145 jar_path = "$android_sdk_root/extras/android/support/v17/leanback/libs/android -support-v17-leanback.jar" 130 lib_name = "leanback-v17"
131 aar_path = "$lib_path/$lib_name/$lib_version/$lib_name-$lib_version.aar"
146 } 132 }
147 133
148 # TODO(jbudorick): Remove this once net_java_test_support no longer needs it. 134 # TODO(jbudorick): Remove this once net_java_test_support no longer needs it.
149 android_java_prebuilt("legacy_http_javalib") { 135 android_java_prebuilt("legacy_http_javalib") {
150 testonly = true 136 testonly = true
151 jar_path = "$android_sdk/optional/org.apache.http.legacy.jar" 137 jar_path = "$android_sdk/optional/org.apache.http.legacy.jar"
152 } 138 }
OLDNEW
« no previous file with comments | « build/config/android/rules.gni ('k') | chrome/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698