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',
235 'includes': [ '../build/java.gypi' ],
238 'target_name': 'cronet_sample_apk',
245 'apk_name': 'CronetSample',
246 'java_in_dir': 'cronet/android/sample',
247 'resource_dir': 'cronet/android/sample/res',
248 'native_lib_target': 'libcronet',
249 'proguard_enabled': 'true',
250 'proguard_flags_paths': [
251 'cronet/android/proguard.cfg',
252 'cronet/android/sample/javatests/proguard.cfg',
255 'includes': [ '../build/java_apk.gypi' ],
258 # cronet_sample_apk creates a .jar as a side effect. Any java targets
259 # that need that .jar in their classpath should depend on this target,
260 # cronet_sample_apk_java. Dependents of cronet_sample_apk receive its
261 # jar path in the variable 'apk_output_jar_path'. This target should
262 # only be used by targets which instrument cronet_sample_apk.
263 'target_name': 'cronet_sample_apk_java',
268 'includes': [ '../build/apk_fake_jar.gypi' ],
271 'target_name': 'cronet_sample_test_apk',
275 'cronet_sample_apk_java',
277 '../base/base.gyp:base_java_test_support',
280 'apk_name': 'CronetSampleTest',
281 'java_in_dir': 'cronet/android/sample/javatests',
282 'resource_dir': 'cronet/android/sample/res',
285 'includes': [ '../build/java_apk.gypi' ],
288 'target_name': 'cronet_tests_jni_headers',
291 'cronet/android/test/src/org/chromium/cronet_test_apk/CronetTestUtil.java',
292 'cronet/android/test/src/org/chromium/cronet_test_apk/MockUrlRequestJobFactory.java',
293 'cronet/android/test/src/org/chromium/cronet_test_apk/UploadTestServer.java',
294 'cronet/android/test/src/org/chromium/cronet_test_apk/NetworkChangeNotifierUtil.java',
297 'jni_gen_package': 'cronet_tests',
299 'includes': [ '../build/jni_generator.gypi' ],
302 'target_name': 'libcronet_tests',
303 'type': 'shared_library',
305 'cronet/android/test/cronet_test_jni.cc',
306 'cronet/android/test/mock_url_request_job_factory.cc',
307 'cronet/android/test/mock_url_request_job_factory.h',
308 'cronet/android/test/upload_test_server.cc',
309 'cronet/android/test/upload_test_server.h',
310 'cronet/android/test/network_change_notifier_util.cc',
311 'cronet/android/test/network_change_notifier_util.h',
315 'cronet_tests_jni_headers',
316 '../base/base.gyp:base',
317 '../net/net.gyp:net',
318 '../net/net.gyp:net_test_support',
319 '../net/net.gyp:quic_tools',
320 '../url/url.gyp:url_lib',
321 '../base/base.gyp:base_i18n',
322 '../third_party/icu/icu.gyp:icui18n',
323 '../third_party/icu/icu.gyp:icuuc',
326 ['use_icu_alternatives_on_android==1',
329 '../net/base/directory_lister.cc',
330 '../net/base/directory_lister.h',
331 '../net/url_request/url_request_file_job.cc',
332 '../net/url_request/url_request_file_job.h',
339 'target_name': 'cronet_test_apk',
345 'apk_name': 'CronetTest',
346 'java_in_dir': 'cronet/android/test',
347 'resource_dir': 'cronet/android/test/res',
348 'asset_location': 'cronet/android/test/assets',
349 'native_lib_target': 'libcronet_tests',
351 'includes': [ '../build/java_apk.gypi' ],
354 # cronet_test_apk creates a .jar as a side effect. Any java targets
355 # that need that .jar in their classpath should depend on this target,
356 # cronet_test_apk_java. Dependents of cronet_test_apk receive its
357 # jar path in the variable 'apk_output_jar_path'. This target should
358 # only be used by targets which instrument cronet_test_apk.
359 'target_name': 'cronet_test_apk_java',
364 'includes': [ '../build/apk_fake_jar.gypi' ],
367 'target_name': 'cronet_test_instrumentation_apk',
370 'cronet_test_apk_java',
371 '../base/base.gyp:base_java_test_support',
374 'apk_name': 'CronetTestInstrumentation',
375 'java_in_dir': 'cronet/android/test/javatests',
376 'resource_dir': 'cronet/android/test/res',
379 'includes': [ '../build/java_apk.gypi' ],
383 ['OS=="android" and use_icu_alternatives_on_android==1', {
386 'target_name': 'cronet_package',
394 'native_lib': 'libcronet.>(android_product_extension)',
395 'java_lib': 'cronet.jar',
396 'java_stub_lib': 'cronet_stub.jar',
397 'java_src_lib': 'cronet-src.jar',
398 'java_sample_src_lib': 'cronet-sample-src.jar',
399 'lib_java_dir': '<(PRODUCT_DIR)/lib.java',
400 'package_dir': '<(PRODUCT_DIR)/cronet',
401 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/cronet',
402 'jar_extract_dir': '<(intermediate_dir)/cronet_jar_extract',
403 'jar_excluded_classes': [
404 '*/library_loader/*',
406 'jar_extract_stamp': '<(intermediate_dir)/jar_extract.stamp',
407 'cronet_jar_stamp': '<(intermediate_dir)/cronet_jar.stamp',
411 'action_name': 'strip libcronet',
412 'inputs': ['<(SHARED_LIB_DIR)/<(native_lib)'],
413 'outputs': ['<(package_dir)/libs/<(android_app_abi)/<(native_lib)'],
423 'action_name': 'extracting from jars',
425 '<(lib_java_dir)/<(java_lib)',
426 '<(lib_java_dir)/base_java.jar',
427 '<(lib_java_dir)/net_java.jar',
428 '<(lib_java_dir)/url_java.jar',
430 'outputs': ['<(jar_extract_stamp)', '<(jar_extract_dir)'],
433 'cronet/tools/extract_from_jars.py',
434 '--classes-dir=<(jar_extract_dir)',
435 '--jars=<@(_inputs)',
436 '--stamp=<(jar_extract_stamp)',
440 'action_name': 'jar_<(_target_name)',
441 'message': 'Creating <(_target_name) jar',
443 '<(DEPTH)/build/android/gyp/util/build_utils.py',
444 '<(DEPTH)/build/android/gyp/util/md5_check.py',
445 '<(DEPTH)/build/android/gyp/jar.py',
446 '<(jar_extract_stamp)',
449 '<(package_dir)/<(java_lib)',
450 '<(cronet_jar_stamp)',
453 'python', '<(DEPTH)/build/android/gyp/jar.py',
454 '--classes-dir=<(jar_extract_dir)',
455 '--jar-path=<(package_dir)/<(java_lib)',
456 '--excluded-classes=<@(jar_excluded_classes)',
457 '--stamp=<(cronet_jar_stamp)',
461 'action_name': 'jar_src_<(_target_name)',
462 'inputs': ['cronet/tools/jar_src.py'] ,
463 'outputs': ['<(package_dir)/<(java_src_lib)'],
467 '--src-dir=cronet/android/java/src',
468 '--jar-path=<(package_dir)/<(java_src_lib)',
472 'action_name': 'jar_sample_src_<(_target_name)',
473 'inputs': ['cronet/tools/jar_src.py'] ,
474 'outputs': ['<(package_dir)/<(java_sample_src_lib)'],
478 '--src-dir=cronet/android/sample',
479 '--jar-path=<(package_dir)/<(java_sample_src_lib)',
483 'action_name': 'generate licenses',
484 'inputs': ['cronet/tools/cronet_licenses.py'] ,
485 'outputs': ['<(package_dir)/LICENSE'],
496 'destination': '<(package_dir)',
500 'cronet/android/proguard.cfg',
501 '<(lib_java_dir)/<(java_stub_lib)'
505 'destination': '<(package_dir)/symbols/<(android_app_abi)',
507 '<(SHARED_LIB_DIR)/<(native_lib)',
513 }], # OS=="android" and use_icu_alternatives_on_android==1