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/CronetUrlRequest.java',
15 'cronet/android/java/src/org/chromium/net/CronetUrlRequestContext.java',
16 'cronet/android/java/src/org/chromium/net/ChromiumUrlRequest.java',
17 'cronet/android/java/src/org/chromium/net/ChromiumUrlRequestContext.java',
20 'jni_gen_package': 'cronet',
22 'includes': [ '../build/jni_generator.gypi' ],
25 'target_name': 'cronet_url_request_java',
28 'source_file': 'cronet/android/chromium_url_request.h',
30 'includes': [ '../build/android/java_cpp_enum.gypi' ],
33 'target_name': 'net_request_priority_java',
36 'source_file': '../net/base/request_priority.h',
38 'includes': [ '../build/android/java_cpp_enum.gypi' ],
41 'target_name': 'cronet_url_request_context_config_list',
44 'cronet/android/java/src/org/chromium/net/UrlRequestContextConfigList.template',
47 'package_name': 'org/chromium/cronet',
48 'template_deps': ['cronet/url_request_context_config_list.h'],
50 'includes': [ '../build/android/java_cpp_template.gypi' ],
53 'target_name': 'cronet_version',
56 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
57 'version_py_path': '<(DEPTH)/build/util/version.py',
58 'version_path': '<(DEPTH)/chrome/VERSION',
59 'template_input_path': 'cronet/android/java/src/org/chromium/net/Version.template',
60 'output_path': '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)/org/chromium/cronet/Version.java',
62 'direct_dependent_settings': {
64 # Ensure that the output directory is used in the class path
65 # when building targets that depend on this one.
66 'generated_src_dirs': [
67 '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)',
69 # Ensure dependents are rebuilt when the generated Java file changes.
70 'additional_input_paths': [
77 'action_name': 'cronet_version',
79 '<(template_input_path)',
89 '-f', '<(version_path)',
90 '-f', '<(lastchange_path)',
91 '<(template_input_path)',
94 'message': 'Generating version information',
99 'target_name': 'cronet_static',
100 'type': 'static_library',
102 '../base/base.gyp:base',
103 '../base/base.gyp:base_i18n',
104 '../third_party/icu/icu.gyp:icui18n',
105 '../third_party/icu/icu.gyp:icuuc',
106 'cronet_jni_headers',
107 'cronet_url_request_context_config_list',
108 'cronet_url_request_java',
110 '../net/net.gyp:net',
113 'cronet/url_request_context_config.cc',
114 'cronet/url_request_context_config.h',
115 'cronet/url_request_context_config_list.h',
116 'cronet/android/chromium_url_request.cc',
117 'cronet/android/chromium_url_request.h',
118 'cronet/android/chromium_url_request_error_list.h',
119 'cronet/android/chromium_url_request_priority_list.h',
120 'cronet/android/chromium_url_request_context.cc',
121 'cronet/android/chromium_url_request_context.h',
122 'cronet/android/cronet_loader.cc',
123 'cronet/android/cronet_loader.h',
124 'cronet/android/cronet_url_request.cc',
125 'cronet/android/cronet_url_request.h',
126 'cronet/android/cronet_url_request_adapter.cc',
127 'cronet/android/cronet_url_request_adapter.h',
128 'cronet/android/cronet_url_request_context.cc',
129 'cronet/android/cronet_url_request_context.h',
130 'cronet/android/cronet_url_request_context_adapter.cc',
131 'cronet/android/cronet_url_request_context_adapter.h',
132 'cronet/android/url_request_adapter.cc',
133 'cronet/android/url_request_adapter.h',
134 'cronet/android/url_request_context_adapter.cc',
135 'cronet/android/url_request_context_adapter.h',
136 'cronet/android/wrapped_channel_upload_element_reader.cc',
137 'cronet/android/wrapped_channel_upload_element_reader.h',
142 '-ffunction-sections',
144 '-fvisibility=hidden',
145 '-fvisibility-inlines-hidden',
147 '-Wno-missing-field-initializers',
153 '-Wl,--exclude-libs,ALL'
156 [ 'use_icu_alternatives_on_android == 1', {
158 '../base/base.gyp:base_i18n',
159 '../third_party/icu/icu.gyp:icui18n',
160 '../third_party/icu/icu.gyp:icuuc',
167 'target_name': 'libcronet',
168 'type': 'shared_library',
170 'cronet/android/cronet_jni.cc',
174 '../base/base.gyp:base',
175 '../net/net.gyp:net',
176 '../url/url.gyp:url_lib',
179 { # cronet_stub.jar defines HttpUrlRequest interface and provides its
180 # its implementation using HttpUrlConnection (not the Chromium stack).
181 'target_name': 'cronet_stub',
184 'cronet_url_request_context_config_list',
188 'java_in_dir': 'cronet/android/java',
190 '**/ChunkedWritableByteChannel.java',
191 '**/ExtendedResponseInfo.java',
192 '**/HttpUrlConnection*.java',
193 '**/HttpUrlRequest*.java',
194 '**/ResponseInfo.java',
195 '**/ResponseTooLargeException.java',
196 '**/UrlRequest.java',
197 '**/UrlRequestContext.java',
198 '**/UrlRequestContextConfig.java',
199 '**/UrlRequestContextConfigList.java',
200 '**/UrlRequestException.java',
201 '**/UrlRequestListener.java',
206 'includes': [ '../build/java.gypi' ],
208 { # cronet.jar implements HttpUrlRequest interface using Chromium stack
209 # in native libcronet.so library.
210 'target_name': 'cronet',
213 '../base/base.gyp:base',
215 'cronet_url_request_java',
217 'net_request_priority_java',
220 'java_in_dir': 'cronet/android/java',
222 '**/ChromiumAsyncUrlRequest.java',
223 '**/ChromiumUrlRequest.java',
224 '**/ChromiumUrlRequestContext.java',
225 '**/ChromiumUrlRequestError.java',
226 '**/ChromiumUrlRequestFactory.java',
227 '**/ChromiumUrlRequestPriority.java',
228 '**/CronetResponseInfo.java',
229 '**/CronetUrlRequest.java',
230 '**/CronetUrlRequestContext.java',
231 '**/CronetUrlRequestFactory.java',
232 '**/RequestPriority.java',
233 '**/urlconnection/CronetInputStream.java',
234 '**/urlconnection/CronetHttpURLConnection.java',
235 '**/urlconnection/CronetHttpURLStreamHandler.java',
236 '**/urlconnection/CronetURLStreamHandlerFactory.java',
237 '**/urlconnection/MessageLoop.java',
240 'includes': [ '../build/java.gypi' ],
243 'target_name': 'cronet_sample_apk',
250 'apk_name': 'CronetSample',
251 'java_in_dir': 'cronet/android/sample',
252 'resource_dir': 'cronet/android/sample/res',
253 'native_lib_target': 'libcronet',
254 'proguard_enabled': 'true',
255 'proguard_flags_paths': [
256 'cronet/android/proguard.cfg',
257 'cronet/android/sample/javatests/proguard.cfg',
260 'includes': [ '../build/java_apk.gypi' ],
263 # cronet_sample_apk creates a .jar as a side effect. Any java targets
264 # that need that .jar in their classpath should depend on this target,
265 # cronet_sample_apk_java. Dependents of cronet_sample_apk receive its
266 # jar path in the variable 'apk_output_jar_path'. This target should
267 # only be used by targets which instrument cronet_sample_apk.
268 'target_name': 'cronet_sample_apk_java',
273 'includes': [ '../build/apk_fake_jar.gypi' ],
276 'target_name': 'cronet_sample_test_apk',
280 'cronet_sample_apk_java',
282 '../base/base.gyp:base_java_test_support',
285 'apk_name': 'CronetSampleTest',
286 'java_in_dir': 'cronet/android/sample/javatests',
287 'resource_dir': 'cronet/android/sample/res',
290 'includes': [ '../build/java_apk.gypi' ],
293 'target_name': 'cronet_tests_jni_headers',
296 'cronet/android/test/src/org/chromium/cronet_test_apk/CronetTestUtil.java',
297 'cronet/android/test/src/org/chromium/cronet_test_apk/MockUrlRequestJobFactory.java',
298 'cronet/android/test/src/org/chromium/cronet_test_apk/UploadTestServer.java',
299 'cronet/android/test/src/org/chromium/cronet_test_apk/NetworkChangeNotifierUtil.java',
302 'jni_gen_package': 'cronet_tests',
304 'includes': [ '../build/jni_generator.gypi' ],
307 'target_name': 'libcronet_tests',
308 'type': 'shared_library',
310 'cronet/android/test/cronet_test_jni.cc',
311 'cronet/android/test/mock_url_request_job_factory.cc',
312 'cronet/android/test/mock_url_request_job_factory.h',
313 'cronet/android/test/upload_test_server.cc',
314 'cronet/android/test/upload_test_server.h',
315 'cronet/android/test/network_change_notifier_util.cc',
316 'cronet/android/test/network_change_notifier_util.h',
320 'cronet_tests_jni_headers',
321 '../base/base.gyp:base',
322 '../net/net.gyp:net',
323 '../net/net.gyp:net_test_support',
324 '../net/net.gyp:quic_tools',
325 '../url/url.gyp:url_lib',
326 '../base/base.gyp:base_i18n',
327 '../third_party/icu/icu.gyp:icui18n',
328 '../third_party/icu/icu.gyp:icuuc',
331 ['use_icu_alternatives_on_android==1',
334 '../net/base/directory_lister.cc',
335 '../net/base/directory_lister.h',
336 '../net/url_request/url_request_file_job.cc',
337 '../net/url_request/url_request_file_job.h',
344 'target_name': 'cronet_test_apk',
350 'apk_name': 'CronetTest',
351 'java_in_dir': 'cronet/android/test',
352 'resource_dir': 'cronet/android/test/res',
353 'asset_location': 'cronet/android/test/assets',
354 'native_lib_target': 'libcronet_tests',
356 'includes': [ '../build/java_apk.gypi' ],
359 # cronet_test_apk creates a .jar as a side effect. Any java targets
360 # that need that .jar in their classpath should depend on this target,
361 # cronet_test_apk_java. Dependents of cronet_test_apk receive its
362 # jar path in the variable 'apk_output_jar_path'. This target should
363 # only be used by targets which instrument cronet_test_apk.
364 'target_name': 'cronet_test_apk_java',
369 'includes': [ '../build/apk_fake_jar.gypi' ],
372 'target_name': 'cronet_test_instrumentation_apk',
375 'cronet_test_apk_java',
376 '../base/base.gyp:base_java_test_support',
379 'apk_name': 'CronetTestInstrumentation',
380 'java_in_dir': 'cronet/android/test/javatests',
381 'resource_dir': 'cronet/android/test/res',
384 'includes': [ '../build/java_apk.gypi' ],
388 ['OS=="android" and use_icu_alternatives_on_android==1', {
391 'target_name': 'cronet_package',
399 'native_lib': 'libcronet.>(android_product_extension)',
400 'java_lib': 'cronet.jar',
401 'java_stub_lib': 'cronet_stub.jar',
402 'java_src_lib': 'cronet-src.jar',
403 'java_sample_src_lib': 'cronet-sample-src.jar',
404 'lib_java_dir': '<(PRODUCT_DIR)/lib.java',
405 'package_dir': '<(PRODUCT_DIR)/cronet',
406 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/cronet',
407 'jar_extract_dir': '<(intermediate_dir)/cronet_jar_extract',
408 'jar_excluded_classes': [
409 '*/library_loader/*',
411 'jar_extract_stamp': '<(intermediate_dir)/jar_extract.stamp',
412 'cronet_jar_stamp': '<(intermediate_dir)/cronet_jar.stamp',
416 'action_name': 'strip libcronet',
417 'inputs': ['<(SHARED_LIB_DIR)/<(native_lib)'],
418 'outputs': ['<(package_dir)/libs/<(android_app_abi)/<(native_lib)'],
428 'action_name': 'extracting from jars',
430 '<(lib_java_dir)/<(java_lib)',
431 '<(lib_java_dir)/base_java.jar',
432 '<(lib_java_dir)/net_java.jar',
433 '<(lib_java_dir)/url_java.jar',
435 'outputs': ['<(jar_extract_stamp)', '<(jar_extract_dir)'],
438 'cronet/tools/extract_from_jars.py',
439 '--classes-dir=<(jar_extract_dir)',
440 '--jars=<@(_inputs)',
441 '--stamp=<(jar_extract_stamp)',
445 'action_name': 'jar_<(_target_name)',
446 'message': 'Creating <(_target_name) jar',
448 '<(DEPTH)/build/android/gyp/util/build_utils.py',
449 '<(DEPTH)/build/android/gyp/util/md5_check.py',
450 '<(DEPTH)/build/android/gyp/jar.py',
451 '<(jar_extract_stamp)',
454 '<(package_dir)/<(java_lib)',
455 '<(cronet_jar_stamp)',
458 'python', '<(DEPTH)/build/android/gyp/jar.py',
459 '--classes-dir=<(jar_extract_dir)',
460 '--jar-path=<(package_dir)/<(java_lib)',
461 '--excluded-classes=<@(jar_excluded_classes)',
462 '--stamp=<(cronet_jar_stamp)',
466 'action_name': 'jar_src_<(_target_name)',
467 'inputs': ['cronet/tools/jar_src.py'] ,
468 'outputs': ['<(package_dir)/<(java_src_lib)'],
472 '--src-dir=cronet/android/java/src',
473 '--jar-path=<(package_dir)/<(java_src_lib)',
477 'action_name': 'jar_sample_src_<(_target_name)',
478 'inputs': ['cronet/tools/jar_src.py'] ,
479 'outputs': ['<(package_dir)/<(java_sample_src_lib)'],
483 '--src-dir=cronet/android/sample',
484 '--jar-path=<(package_dir)/<(java_sample_src_lib)',
488 'action_name': 'generate licenses',
489 'inputs': ['cronet/tools/cronet_licenses.py'] ,
490 'outputs': ['<(package_dir)/LICENSE'],
501 'destination': '<(package_dir)',
505 'cronet/android/proguard.cfg',
506 '<(lib_java_dir)/<(java_stub_lib)'
510 'destination': '<(package_dir)/symbols/<(android_app_abi)',
512 '<(SHARED_LIB_DIR)/<(native_lib)',
518 }], # OS=="android" and use_icu_alternatives_on_android==1