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.
8 # TODO(mef): Figure out what needs to be done for gn script.
11 'target_name': 'cronet_jni_headers',
14 'cronet/android/java/src/org/chromium/net/CronetHistogramManager.java',
15 'cronet/android/java/src/org/chromium/net/CronetLibraryLoader.java',
16 'cronet/android/java/src/org/chromium/net/CronetUrlRequest.java',
17 'cronet/android/java/src/org/chromium/net/CronetUrlRequestContext.java',
18 'cronet/android/java/src/org/chromium/net/ChromiumUrlRequest.java',
19 'cronet/android/java/src/org/chromium/net/ChromiumUrlRequestContext.java',
22 'jni_gen_package': 'cronet',
24 'includes': [ '../build/jni_generator.gypi' ],
27 'target_name': 'cronet_url_request_java',
30 'source_file': 'cronet/android/chromium_url_request.h',
32 'includes': [ '../build/android/java_cpp_enum.gypi' ],
35 'target_name': 'net_request_priority_java',
38 'source_file': '../net/base/request_priority.h',
40 'includes': [ '../build/android/java_cpp_enum.gypi' ],
43 'target_name': 'cronet_url_request_context_config_list',
46 'cronet/android/java/src/org/chromium/net/UrlRequestContextConfigList.template',
49 'package_name': 'org/chromium/cronet',
50 'template_deps': ['cronet/url_request_context_config_list.h'],
52 'includes': [ '../build/android/java_cpp_template.gypi' ],
55 'target_name': 'cronet_version',
58 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
59 'version_py_path': '<(DEPTH)/build/util/version.py',
60 'version_path': '<(DEPTH)/chrome/VERSION',
61 'template_input_path': 'cronet/android/java/src/org/chromium/net/Version.template',
62 'output_path': '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)/org/chromium/cronet/Version.java',
64 'direct_dependent_settings': {
66 # Ensure that the output directory is used in the class path
67 # when building targets that depend on this one.
68 'generated_src_dirs': [
69 '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)',
71 # Ensure dependents are rebuilt when the generated Java file changes.
72 'additional_input_paths': [
79 'action_name': 'cronet_version',
81 '<(template_input_path)',
91 '-f', '<(version_path)',
92 '-f', '<(lastchange_path)',
93 '<(template_input_path)',
96 'message': 'Generating version information',
101 'target_name': 'cronet_static',
102 'type': 'static_library',
104 '../base/base.gyp:base',
105 '../base/base.gyp:base_i18n',
106 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
107 '../third_party/icu/icu.gyp:icui18n',
108 '../third_party/icu/icu.gyp:icuuc',
109 'cronet_jni_headers',
110 'cronet_url_request_context_config_list',
111 'cronet_url_request_java',
114 '../net/net.gyp:net',
117 'cronet/android/chromium_url_request.cc',
118 'cronet/android/chromium_url_request.h',
119 'cronet/android/chromium_url_request_context.cc',
120 'cronet/android/chromium_url_request_context.h',
121 'cronet/android/chromium_url_request_error_list.h',
122 'cronet/android/chromium_url_request_priority_list.h',
123 'cronet/android/cronet_histogram_manager.cc',
124 'cronet/android/cronet_histogram_manager.h',
125 'cronet/android/cronet_library_loader.cc',
126 'cronet/android/cronet_library_loader.h',
127 'cronet/android/cronet_url_request.cc',
128 'cronet/android/cronet_url_request.h',
129 'cronet/android/cronet_url_request_adapter.cc',
130 'cronet/android/cronet_url_request_adapter.h',
131 'cronet/android/cronet_url_request_context_adapter.cc',
132 'cronet/android/cronet_url_request_context_adapter.h',
133 'cronet/android/url_request_adapter.cc',
134 'cronet/android/url_request_adapter.h',
135 'cronet/android/url_request_context_adapter.cc',
136 'cronet/android/url_request_context_adapter.h',
137 'cronet/android/wrapped_channel_upload_element_reader.cc',
138 'cronet/android/wrapped_channel_upload_element_reader.h',
139 'cronet/url_request_context_config.cc',
140 'cronet/url_request_context_config.h',
141 'cronet/url_request_context_config_list.h',
146 '-ffunction-sections',
148 '-fvisibility=hidden',
149 '-fvisibility-inlines-hidden',
151 '-Wno-missing-field-initializers',
157 '-Wl,--exclude-libs,ALL'
160 [ 'use_icu_alternatives_on_android == 1', {
162 '../base/base.gyp:base_i18n',
163 '../third_party/icu/icu.gyp:icui18n',
164 '../third_party/icu/icu.gyp:icuuc',
171 'target_name': 'libcronet',
172 'type': 'shared_library',
174 'cronet/android/cronet_jni.cc',
178 '../base/base.gyp:base',
179 '../net/net.gyp:net',
180 '../url/url.gyp:url_lib',
183 { # cronet_stub.jar defines HttpUrlRequest interface and provides its
184 # its implementation using HttpUrlConnection (not the Chromium stack).
185 'target_name': 'cronet_stub',
188 'cronet_url_request_context_config_list',
192 'java_in_dir': 'cronet/android/java',
194 '**/ChunkedWritableByteChannel.java',
195 '**/ExtendedResponseInfo.java',
196 '**/HistogramManager.java',
197 '**/HttpUrlConnection*.java',
198 '**/HttpUrlRequest*.java',
199 '**/ResponseInfo.java',
200 '**/ResponseTooLargeException.java',
201 '**/UrlRequest.java',
202 '**/UrlRequestContext.java',
203 '**/UrlRequestContextConfig.java',
204 '**/UrlRequestContextConfigList.java',
205 '**/UrlRequestException.java',
206 '**/UrlRequestListener.java',
211 'includes': [ '../build/java.gypi' ],
213 { # cronet.jar implements HttpUrlRequest interface using Chromium stack
214 # in native libcronet.so library.
215 'target_name': 'cronet',
218 '../base/base.gyp:base',
220 'cronet_url_request_java',
222 'net_request_priority_java',
225 'java_in_dir': 'cronet/android/java',
227 '**/ChromiumAsyncUrlRequest.java',
228 '**/ChromiumUrlRequest.java',
229 '**/ChromiumUrlRequestContext.java',
230 '**/ChromiumUrlRequestError.java',
231 '**/ChromiumUrlRequestFactory.java',
232 '**/ChromiumUrlRequestPriority.java',
233 '**/CronetHistogramManager.java',
234 '**/CronetResponseInfo.java',
235 '**/CronetLibraryLoader.java',
236 '**/CronetUrlRequest.java',
237 '**/CronetUrlRequestContext.java',
238 '**/CronetUrlRequestFactory.java',
239 '**/RequestPriority.java',
240 '**/urlconnection/CronetInputStream.java',
241 '**/urlconnection/CronetHttpURLConnection.java',
242 '**/urlconnection/CronetHttpURLStreamHandler.java',
243 '**/urlconnection/CronetURLStreamHandlerFactory.java',
244 '**/urlconnection/MessageLoop.java',
247 'includes': [ '../build/java.gypi' ],
250 'target_name': 'cronet_sample_apk',
257 'apk_name': 'CronetSample',
258 'java_in_dir': 'cronet/android/sample',
259 'resource_dir': 'cronet/android/sample/res',
260 'native_lib_target': 'libcronet',
261 'proguard_enabled': 'true',
262 'proguard_flags_paths': [
263 'cronet/android/proguard.cfg',
264 'cronet/android/sample/javatests/proguard.cfg',
267 'includes': [ '../build/java_apk.gypi' ],
270 # cronet_sample_apk creates a .jar as a side effect. Any java targets
271 # that need that .jar in their classpath should depend on this target,
272 # cronet_sample_apk_java. Dependents of cronet_sample_apk receive its
273 # jar path in the variable 'apk_output_jar_path'. This target should
274 # only be used by targets which instrument cronet_sample_apk.
275 'target_name': 'cronet_sample_apk_java',
280 'includes': [ '../build/apk_fake_jar.gypi' ],
283 'target_name': 'cronet_sample_test_apk',
287 'cronet_sample_apk_java',
289 '../base/base.gyp:base_java_test_support',
292 'apk_name': 'CronetSampleTest',
293 'java_in_dir': 'cronet/android/sample/javatests',
294 'resource_dir': 'cronet/android/sample/res',
297 'includes': [ '../build/java_apk.gypi' ],
300 'target_name': 'cronet_tests_jni_headers',
303 'cronet/android/test/src/org/chromium/net/CronetTestUtil.java',
304 'cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java',
305 'cronet/android/test/src/org/chromium/net/NativeTestServer.java',
306 'cronet/android/test/src/org/chromium/net/NetworkChangeNotifierUtil.java',
309 'jni_gen_package': 'cronet_tests',
311 'includes': [ '../build/jni_generator.gypi' ],
314 'target_name': 'libcronet_tests',
315 'type': 'shared_library',
317 'cronet/android/test/cronet_test_jni.cc',
318 'cronet/android/test/mock_url_request_job_factory.cc',
319 'cronet/android/test/mock_url_request_job_factory.h',
320 'cronet/android/test/native_test_server.cc',
321 'cronet/android/test/native_test_server.h',
322 'cronet/android/test/network_change_notifier_util.cc',
323 'cronet/android/test/network_change_notifier_util.h',
327 'cronet_tests_jni_headers',
328 '../base/base.gyp:base',
329 '../net/net.gyp:net',
330 '../net/net.gyp:net_test_support',
331 '../net/net.gyp:quic_tools',
332 '../url/url.gyp:url_lib',
333 '../base/base.gyp:base_i18n',
334 '../third_party/icu/icu.gyp:icui18n',
335 '../third_party/icu/icu.gyp:icuuc',
338 ['use_icu_alternatives_on_android==1',
341 '../net/base/directory_lister.cc',
342 '../net/base/directory_lister.h',
343 '../net/url_request/url_request_file_job.cc',
344 '../net/url_request/url_request_file_job.h',
351 'target_name': 'cronet_test_apk',
357 'apk_name': 'CronetTest',
358 'java_in_dir': 'cronet/android/test',
359 'resource_dir': 'cronet/android/test/res',
360 'asset_location': 'cronet/android/test/assets',
361 'native_lib_target': 'libcronet_tests',
363 'includes': [ '../build/java_apk.gypi' ],
366 # cronet_test_apk creates a .jar as a side effect. Any java targets
367 # that need that .jar in their classpath should depend on this target,
368 # cronet_test_apk_java. Dependents of cronet_test_apk receive its
369 # jar path in the variable 'apk_output_jar_path'. This target should
370 # only be used by targets which instrument cronet_test_apk.
371 'target_name': 'cronet_test_apk_java',
376 'includes': [ '../build/apk_fake_jar.gypi' ],
379 'target_name': 'cronet_test_instrumentation_apk',
382 'cronet_test_apk_java',
383 '../base/base.gyp:base_java_test_support',
386 'apk_name': 'CronetTestInstrumentation',
387 'java_in_dir': 'cronet/android/test/javatests',
388 'resource_dir': 'cronet/android/test/res',
391 'includes': [ '../build/java_apk.gypi' ],
395 ['OS=="android" and use_icu_alternatives_on_android==1', {
398 'target_name': 'cronet_package',
406 'native_lib': 'libcronet.>(android_product_extension)',
407 'java_lib': 'cronet.jar',
408 'java_stub_lib': 'cronet_stub.jar',
409 'java_src_lib': 'cronet-src.jar',
410 'java_sample_src_lib': 'cronet-sample-src.jar',
411 'lib_java_dir': '<(PRODUCT_DIR)/lib.java',
412 'package_dir': '<(PRODUCT_DIR)/cronet',
413 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/cronet',
414 'jar_extract_dir': '<(intermediate_dir)/cronet_jar_extract',
415 'jar_excluded_classes': [
416 '*/library_loader/*',
418 'jar_extract_stamp': '<(intermediate_dir)/jar_extract.stamp',
419 'cronet_jar_stamp': '<(intermediate_dir)/cronet_jar.stamp',
423 'action_name': 'strip libcronet',
424 'inputs': ['<(SHARED_LIB_DIR)/<(native_lib)'],
425 'outputs': ['<(package_dir)/libs/<(android_app_abi)/<(native_lib)'],
435 'action_name': 'extracting from jars',
437 '<(lib_java_dir)/<(java_lib)',
438 '<(lib_java_dir)/base_java.jar',
439 '<(lib_java_dir)/net_java.jar',
440 '<(lib_java_dir)/url_java.jar',
442 'outputs': ['<(jar_extract_stamp)', '<(jar_extract_dir)'],
445 'cronet/tools/extract_from_jars.py',
446 '--classes-dir=<(jar_extract_dir)',
447 '--jars=<@(_inputs)',
448 '--stamp=<(jar_extract_stamp)',
452 'action_name': 'jar_<(_target_name)',
453 'message': 'Creating <(_target_name) jar',
455 '<(DEPTH)/build/android/gyp/util/build_utils.py',
456 '<(DEPTH)/build/android/gyp/util/md5_check.py',
457 '<(DEPTH)/build/android/gyp/jar.py',
458 '<(jar_extract_stamp)',
461 '<(package_dir)/<(java_lib)',
462 '<(cronet_jar_stamp)',
465 'python', '<(DEPTH)/build/android/gyp/jar.py',
466 '--classes-dir=<(jar_extract_dir)',
467 '--jar-path=<(package_dir)/<(java_lib)',
468 '--excluded-classes=<@(jar_excluded_classes)',
469 '--stamp=<(cronet_jar_stamp)',
473 'action_name': 'jar_src_<(_target_name)',
474 'inputs': ['cronet/tools/jar_src.py'] ,
475 'outputs': ['<(package_dir)/<(java_src_lib)'],
479 '--src-dir=cronet/android/java/src',
480 '--jar-path=<(package_dir)/<(java_src_lib)',
484 'action_name': 'jar_sample_src_<(_target_name)',
485 'inputs': ['cronet/tools/jar_src.py'] ,
486 'outputs': ['<(package_dir)/<(java_sample_src_lib)'],
490 '--src-dir=cronet/android/sample',
491 '--jar-path=<(package_dir)/<(java_sample_src_lib)',
495 'action_name': 'generate licenses',
496 'inputs': ['cronet/tools/cronet_licenses.py'] ,
497 'outputs': ['<(package_dir)/LICENSE'],
508 'destination': '<(package_dir)',
512 'cronet/android/proguard.cfg',
513 '<(lib_java_dir)/<(java_stub_lib)'
517 'destination': '<(package_dir)/symbols/<(android_app_abi)',
519 '<(SHARED_LIB_DIR)/<(native_lib)',
525 }], # OS=="android" and use_icu_alternatives_on_android==1