OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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/buildflag_header.gni") | 5 import("//build/buildflag_header.gni") |
6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
7 import("//build/config/android/rules.gni") | 7 import("//build/config/android/rules.gni") |
8 import("//build/util/version.gni") | 8 import("//build/util/version.gni") |
9 import("//chrome/version.gni") | 9 import("//chrome/version.gni") |
10 import("//testing/test.gni") | 10 import("//testing/test.gni") |
| 11 import("//url/features.gni") |
11 | 12 |
12 assert(!is_component_build, "Cronet requires static library build.") | 13 assert(!is_component_build, "Cronet requires static library build.") |
13 | 14 |
14 declare_args() { | 15 declare_args() { |
15 cronet_enable_data_reduction_proxy_support = false | 16 cronet_enable_data_reduction_proxy_support = false |
16 } | 17 } |
17 | 18 |
18 generate_jni("cronet_jni_headers") { | 19 generate_jni("cronet_jni_headers") { |
19 sources = [ | 20 sources = [ |
20 "java/src/org/chromium/net/ChromiumUrlRequest.java", | 21 "java/src/org/chromium/net/ChromiumUrlRequest.java", |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 114 |
114 deps = [ | 115 deps = [ |
115 ":chromium_url_request_java", | 116 ":chromium_url_request_java", |
116 ":cronet_jni_headers", | 117 ":cronet_jni_headers", |
117 ":cronet_version_header", | 118 ":cronet_version_header", |
118 "//base", | 119 "//base", |
119 "//base:i18n", | 120 "//base:i18n", |
120 "//base/third_party/dynamic_annotations", | 121 "//base/third_party/dynamic_annotations", |
121 "//components/metrics", | 122 "//components/metrics", |
122 "//components/prefs", | 123 "//components/prefs", |
| 124 "//url:url_features", |
123 ] | 125 ] |
124 sources = [ | 126 sources = [ |
125 "//components/cronet/android/chromium_url_request.cc", | 127 "//components/cronet/android/chromium_url_request.cc", |
126 "//components/cronet/android/chromium_url_request.h", | 128 "//components/cronet/android/chromium_url_request.h", |
127 "//components/cronet/android/chromium_url_request_context.cc", | 129 "//components/cronet/android/chromium_url_request_context.cc", |
128 "//components/cronet/android/chromium_url_request_context.h", | 130 "//components/cronet/android/chromium_url_request_context.h", |
129 "//components/cronet/android/cronet_bidirectional_stream_adapter.cc", | 131 "//components/cronet/android/cronet_bidirectional_stream_adapter.cc", |
130 "//components/cronet/android/cronet_bidirectional_stream_adapter.h", | 132 "//components/cronet/android/cronet_bidirectional_stream_adapter.h", |
131 "//components/cronet/android/cronet_in_memory_pref_store.cc", | 133 "//components/cronet/android/cronet_in_memory_pref_store.cc", |
132 "//components/cronet/android/cronet_in_memory_pref_store.h", | 134 "//components/cronet/android/cronet_in_memory_pref_store.h", |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 if (defined(invoker.defines)) { | 181 if (defined(invoker.defines)) { |
180 defines += invoker.defines | 182 defines += invoker.defines |
181 } | 183 } |
182 | 184 |
183 if (defined(invoker.deps)) { | 185 if (defined(invoker.deps)) { |
184 deps += invoker.deps | 186 deps += invoker.deps |
185 } | 187 } |
186 } | 188 } |
187 } | 189 } |
188 | 190 |
189 # cronet_static_small target has reduced binary size through using | |
190 # ICU alternatives which requires file and ftp support be disabled. | |
191 cronet_static_tmpl("cronet_static_small") { | |
192 defines = [ | |
193 "USE_ICU_ALTERNATIVES_ON_ANDROID=1", | |
194 "DISABLE_FILE_SUPPORT=1", | |
195 "DISABLE_FTP_SUPPORT=1", | |
196 ] | |
197 | |
198 deps = [ | |
199 "//net:net_small", | |
200 "//url:url_lib_use_icu_alternatives_on_android", | |
201 ] | |
202 | |
203 if (cronet_enable_data_reduction_proxy_support) { | |
204 deps += [ | |
205 "//components/data_reduction_proxy/core/browser:browser_small", | |
206 "//components/data_reduction_proxy/core/common:common_small", | |
207 ] | |
208 } | |
209 } | |
210 | |
211 # cronet_static target depends on ICU and includes file and ftp support. | |
212 cronet_static_tmpl("cronet_static") { | 191 cronet_static_tmpl("cronet_static") { |
213 deps = [ | 192 deps = [ |
214 "//base:i18n", | |
215 "//net", | 193 "//net", |
216 "//url", | 194 "//url", |
217 ] | 195 ] |
218 | 196 |
219 if (cronet_enable_data_reduction_proxy_support) { | 197 if (cronet_enable_data_reduction_proxy_support) { |
220 deps += [ | 198 deps += [ |
221 "//components/data_reduction_proxy/core/browser", | 199 "//components/data_reduction_proxy/core/browser:browser_small", |
222 "//components/data_reduction_proxy/core/common", | 200 "//components/data_reduction_proxy/core/common", |
223 ] | 201 ] |
224 } | 202 } |
| 203 |
| 204 if (!use_platform_icu_alternatives) { |
| 205 deps += [ "//base:i18n" ] |
| 206 } |
225 } | 207 } |
226 | 208 |
227 shared_library("cronet") { | 209 shared_library("cronet") { |
228 sources = [ | 210 sources = [ |
229 "cronet_jni.cc", | 211 "cronet_jni.cc", |
230 ] | 212 ] |
231 deps = [ | 213 deps = [ |
232 ":cronet_static_small", | 214 ":cronet_static", |
233 "//base", | 215 "//base", |
234 "//net:net_small", | 216 "//net:net", |
235 ] | 217 ] |
236 ldflags = [ "-Wl,--version-script=" + | 218 ldflags = [ "-Wl,--version-script=" + |
237 rebase_path("//components/cronet/android/only_jni_exports.lst") ] | 219 rebase_path("//components/cronet/android/only_jni_exports.lst") ] |
238 | 220 |
239 # Avoid hide_native_jni_exports as it adds another version script, and the | 221 # Avoid hide_native_jni_exports as it adds another version script, and the |
240 # ARM64 linker throws an error for multiple version scripts with anonymous | 222 # ARM64 linker throws an error for multiple version scripts with anonymous |
241 # version tags. | 223 # version tags. |
242 configs -= [ "//build/config/android:hide_native_jni_exports" ] | 224 configs -= [ "//build/config/android:hide_native_jni_exports" ] |
243 } | 225 } |
244 | 226 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 | 440 |
459 ldflags = [ "-Wl,--version-script=" + | 441 ldflags = [ "-Wl,--version-script=" + |
460 rebase_path("//components/cronet/android/only_jni_exports.lst") ] | 442 rebase_path("//components/cronet/android/only_jni_exports.lst") ] |
461 | 443 |
462 # Avoid hide_native_jni_exports as it adds another version script, and the | 444 # Avoid hide_native_jni_exports as it adds another version script, and the |
463 # ARM64 linker throws an error for multiple version scripts with anonymous | 445 # ARM64 linker throws an error for multiple version scripts with anonymous |
464 # version tags. | 446 # version tags. |
465 configs -= [ "//build/config/android:hide_native_jni_exports" ] | 447 configs -= [ "//build/config/android:hide_native_jni_exports" ] |
466 | 448 |
467 if (cronet_enable_data_reduction_proxy_support) { | 449 if (cronet_enable_data_reduction_proxy_support) { |
468 deps += [ "//components/data_reduction_proxy/core/browser" ] | 450 deps += [ "//components/data_reduction_proxy/core/browser:browser_small" ] |
469 } | 451 } |
470 } | 452 } |
471 | 453 |
472 android_resources("cronet_test_apk_resources") { | 454 android_resources("cronet_test_apk_resources") { |
473 testonly = true | 455 testonly = true |
474 resource_dirs = [ "test/res" ] | 456 resource_dirs = [ "test/res" ] |
475 android_manifest = "test/AndroidManifest.xml" | 457 android_manifest = "test/AndroidManifest.xml" |
476 } | 458 } |
477 | 459 |
478 android_library("cronet_test_apk_java") { | 460 android_library("cronet_test_apk_java") { |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 ":cronet_package_copy_native_lib", | 869 ":cronet_package_copy_native_lib", |
888 ":cronet_package_copy_native_lib_unstripped", | 870 ":cronet_package_copy_native_lib_unstripped", |
889 ":generate_javadoc", | 871 ":generate_javadoc", |
890 ":generate_licenses", | 872 ":generate_licenses", |
891 ":jar_cronet_api_source", | 873 ":jar_cronet_api_source", |
892 ":jar_cronet_other_source", | 874 ":jar_cronet_other_source", |
893 ":jar_cronet_sample_source", | 875 ":jar_cronet_sample_source", |
894 ":repackage_extracted_jars", | 876 ":repackage_extracted_jars", |
895 ] | 877 ] |
896 } | 878 } |
OLD | NEW |