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',
18 'cronet/android/java/src/org/chromium/net/HistogramManager.java',
21 'jni_gen_package': 'cronet',
23 'includes': [ '../build/jni_generator.gypi' ],
26 'target_name': 'cronet_url_request_java',
29 'source_file': 'cronet/android/chromium_url_request.h',
31 'includes': [ '../build/android/java_cpp_enum.gypi' ],
34 'target_name': 'net_request_priority_java',
37 'source_file': '../net/base/request_priority.h',
39 'includes': [ '../build/android/java_cpp_enum.gypi' ],
42 'target_name': 'cronet_url_request_context_config_list',
45 'cronet/android/java/src/org/chromium/net/UrlRequestContextConfigList.template',
48 'package_name': 'org/chromium/cronet',
49 'template_deps': ['cronet/url_request_context_config_list.h'],
51 'includes': [ '../build/android/java_cpp_template.gypi' ],
54 'target_name': 'cronet_version',
57 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
58 'version_py_path': '<(DEPTH)/build/util/version.py',
59 'version_path': '<(DEPTH)/chrome/VERSION',
60 'template_input_path': 'cronet/android/java/src/org/chromium/net/Version.template',
61 'output_path': '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)/org/chromium/cronet/Version.java',
63 'direct_dependent_settings': {
65 # Ensure that the output directory is used in the class path
66 # when building targets that depend on this one.
67 'generated_src_dirs': [
68 '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)',
70 # Ensure dependents are rebuilt when the generated Java file changes.
71 'additional_input_paths': [
78 'action_name': 'cronet_version',
80 '<(template_input_path)',
90 '-f', '<(version_path)',
91 '-f', '<(lastchange_path)',
92 '<(template_input_path)',
95 'message': 'Generating version information',
100 'target_name': 'cronet_static',
101 'type': 'static_library',
103 '../base/base.gyp:base',
104 '../base/base.gyp:base_i18n',
105 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
106 '../third_party/icu/icu.gyp:icui18n',
107 '../third_party/icu/icu.gyp:icuuc',
108 'cronet_jni_headers',
109 'cronet_url_request_context_config_list',
110 'cronet_url_request_java',
113 '../net/net.gyp:net',
116 'cronet/url_request_context_config.cc',
117 'cronet/url_request_context_config.h',
118 'cronet/url_request_context_config_list.h',
119 'cronet/android/chromium_url_request.cc',
120 'cronet/android/chromium_url_request.h',
121 'cronet/android/chromium_url_request_error_list.h',
122 'cronet/android/chromium_url_request_priority_list.h',
123 'cronet/android/chromium_url_request_context.cc',
124 'cronet/android/chromium_url_request_context.h',
125 'cronet/android/cronet_loader.cc',
126 'cronet/android/cronet_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.cc',
132 'cronet/android/cronet_url_request_context.h',
133 'cronet/android/cronet_url_request_context_adapter.cc',
134 'cronet/android/cronet_url_request_context_adapter.h',
135 'cronet/android/histogram_manager.cc',
136 'cronet/android/histogram_manager.h',
137 'cronet/android/url_request_adapter.cc',
138 'cronet/android/url_request_adapter.h',
139 'cronet/android/url_request_context_adapter.cc',
140 'cronet/android/url_request_context_adapter.h',
141 'cronet/android/wrapped_channel_upload_element_reader.cc',
142 'cronet/android/wrapped_channel_upload_element_reader.h',
147 '-ffunction-sections',
149 '-fvisibility=hidden',
150 '-fvisibility-inlines-hidden',
152 '-Wno-missing-field-initializers',
158 '-Wl,--exclude-libs,ALL'
161 [ 'use_icu_alternatives_on_android == 1', {
163 '../base/base.gyp:base_i18n',
164 '../third_party/icu/icu.gyp:icui18n',
165 '../third_party/icu/icu.gyp:icuuc',
172 'target_name': 'libcronet',
173 'type': 'shared_library',
175 'cronet/android/cronet_jni.cc',
179 '../base/base.gyp:base',
180 '../net/net.gyp:net',
181 '../url/url.gyp:url_lib',
184 { # cronet_stub.jar defines HttpUrlRequest interface and provides its
185 # its implementation using HttpUrlConnection (not the Chromium stack).
186 'target_name': 'cronet_stub',
189 'cronet_url_request_context_config_list',
193 'java_in_dir': 'cronet/android/java',
195 '**/ChunkedWritableByteChannel.java',
196 '**/ExtendedResponseInfo.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 '**/CronetResponseInfo.java',
234 '**/CronetUrlRequest.java',
235 '**/CronetUrlRequestContext.java',
236 '**/CronetUrlRequestFactory.java',
237 '**/HistogramManager.java',
238 '**/RequestPriority.java',
239 '**/urlconnection/CronetInputStream.java',
240 '**/urlconnection/CronetHttpURLConnection.java',
241 '**/urlconnection/CronetHttpURLStreamHandler.java',
242 '**/urlconnection/CronetURLStreamHandlerFactory.java',
243 '**/urlconnection/MessageLoop.java',
246 'includes': [ '../build/java.gypi' ],
249 'target_name': 'cronet_sample_apk',
256 'apk_name': 'CronetSample',
257 'java_in_dir': 'cronet/android/sample',
258 'resource_dir': 'cronet/android/sample/res',
259 'native_lib_target': 'libcronet',
260 'proguard_enabled': 'true',
261 'proguard_flags_paths': [
262 'cronet/android/proguard.cfg',
263 'cronet/android/sample/javatests/proguard.cfg',
266 'includes': [ '../build/java_apk.gypi' ],
269 # cronet_sample_apk creates a .jar as a side effect. Any java targets
270 # that need that .jar in their classpath should depend on this target,
271 # cronet_sample_apk_java. Dependents of cronet_sample_apk receive its
272 # jar path in the variable 'apk_output_jar_path'. This target should
273 # only be used by targets which instrument cronet_sample_apk.
274 'target_name': 'cronet_sample_apk_java',
279 'includes': [ '../build/apk_fake_jar.gypi' ],
282 'target_name': 'cronet_sample_test_apk',
286 'cronet_sample_apk_java',
288 '../base/base.gyp:base_java_test_support',
291 'apk_name': 'CronetSampleTest',
292 'java_in_dir': 'cronet/android/sample/javatests',
293 'resource_dir': 'cronet/android/sample/res',
296 'includes': [ '../build/java_apk.gypi' ],
299 'target_name': 'cronet_tests_jni_headers',
302 'cronet/android/test/src/org/chromium/cronet_test_apk/CronetTestUtil.java',
303 'cronet/android/test/src/org/chromium/cronet_test_apk/MockUrlRequestJobFactory.java',
304 'cronet/android/test/src/org/chromium/cronet_test_apk/UploadTestServer.java',
305 'cronet/android/test/src/org/chromium/cronet_test_apk/NetworkChangeNotifierUtil.java',
308 'jni_gen_package': 'cronet_tests',
310 'includes': [ '../build/jni_generator.gypi' ],
313 'target_name': 'libcronet_tests',
314 'type': 'shared_library',
316 'cronet/android/test/cronet_test_jni.cc',
317 'cronet/android/test/mock_url_request_job_factory.cc',
318 'cronet/android/test/mock_url_request_job_factory.h',
319 'cronet/android/test/upload_test_server.cc',
320 'cronet/android/test/upload_test_server.h',
321 'cronet/android/test/network_change_notifier_util.cc',
322 'cronet/android/test/network_change_notifier_util.h',
326 'cronet_tests_jni_headers',
327 '../base/base.gyp:base',
328 '../net/net.gyp:net',
329 '../net/net.gyp:net_test_support',
330 '../net/net.gyp:quic_tools',
331 '../url/url.gyp:url_lib',
332 '../base/base.gyp:base_i18n',
333 '../third_party/icu/icu.gyp:icui18n',
334 '../third_party/icu/icu.gyp:icuuc',
337 ['use_icu_alternatives_on_android==1',
340 '../net/base/directory_lister.cc',
341 '../net/base/directory_lister.h',
342 '../net/url_request/url_request_file_job.cc',
343 '../net/url_request/url_request_file_job.h',
350 'target_name': 'cronet_test_apk',
356 'apk_name': 'CronetTest',
357 'java_in_dir': 'cronet/android/test',
358 'resource_dir': 'cronet/android/test/res',
359 'asset_location': 'cronet/android/test/assets',
360 'native_lib_target': 'libcronet_tests',
362 'includes': [ '../build/java_apk.gypi' ],
365 # cronet_test_apk creates a .jar as a side effect. Any java targets
366 # that need that .jar in their classpath should depend on this target,
367 # cronet_test_apk_java. Dependents of cronet_test_apk receive its
368 # jar path in the variable 'apk_output_jar_path'. This target should
369 # only be used by targets which instrument cronet_test_apk.
370 'target_name': 'cronet_test_apk_java',
375 'includes': [ '../build/apk_fake_jar.gypi' ],
378 'target_name': 'cronet_test_instrumentation_apk',
381 'cronet_test_apk_java',
382 '../base/base.gyp:base_java_test_support',
385 'apk_name': 'CronetTestInstrumentation',
386 'java_in_dir': 'cronet/android/test/javatests',
387 'resource_dir': 'cronet/android/test/res',
390 'includes': [ '../build/java_apk.gypi' ],
394 ['OS=="android" and use_icu_alternatives_on_android==1', {
397 'target_name': 'cronet_package',
405 'native_lib': 'libcronet.>(android_product_extension)',
406 'java_lib': 'cronet.jar',
407 'java_stub_lib': 'cronet_stub.jar',
408 'java_src_lib': 'cronet-src.jar',
409 'java_sample_src_lib': 'cronet-sample-src.jar',
410 'lib_java_dir': '<(PRODUCT_DIR)/lib.java',
411 'package_dir': '<(PRODUCT_DIR)/cronet',
412 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/cronet',
413 'jar_extract_dir': '<(intermediate_dir)/cronet_jar_extract',
414 'jar_excluded_classes': [
415 '*/library_loader/*',
417 'jar_extract_stamp': '<(intermediate_dir)/jar_extract.stamp',
418 'cronet_jar_stamp': '<(intermediate_dir)/cronet_jar.stamp',
422 'action_name': 'strip libcronet',
423 'inputs': ['<(SHARED_LIB_DIR)/<(native_lib)'],
424 'outputs': ['<(package_dir)/libs/<(android_app_abi)/<(native_lib)'],
434 'action_name': 'extracting from jars',
436 '<(lib_java_dir)/<(java_lib)',
437 '<(lib_java_dir)/base_java.jar',
438 '<(lib_java_dir)/net_java.jar',
439 '<(lib_java_dir)/url_java.jar',
441 'outputs': ['<(jar_extract_stamp)', '<(jar_extract_dir)'],
444 'cronet/tools/extract_from_jars.py',
445 '--classes-dir=<(jar_extract_dir)',
446 '--jars=<@(_inputs)',
447 '--stamp=<(jar_extract_stamp)',
451 'action_name': 'jar_<(_target_name)',
452 'message': 'Creating <(_target_name) jar',
454 '<(DEPTH)/build/android/gyp/util/build_utils.py',
455 '<(DEPTH)/build/android/gyp/util/md5_check.py',
456 '<(DEPTH)/build/android/gyp/jar.py',
457 '<(jar_extract_stamp)',
460 '<(package_dir)/<(java_lib)',
461 '<(cronet_jar_stamp)',
464 'python', '<(DEPTH)/build/android/gyp/jar.py',
465 '--classes-dir=<(jar_extract_dir)',
466 '--jar-path=<(package_dir)/<(java_lib)',
467 '--excluded-classes=<@(jar_excluded_classes)',
468 '--stamp=<(cronet_jar_stamp)',
472 'action_name': 'jar_src_<(_target_name)',
473 'inputs': ['cronet/tools/jar_src.py'] ,
474 'outputs': ['<(package_dir)/<(java_src_lib)'],
478 '--src-dir=cronet/android/java/src',
479 '--jar-path=<(package_dir)/<(java_src_lib)',
483 'action_name': 'jar_sample_src_<(_target_name)',
484 'inputs': ['cronet/tools/jar_src.py'] ,
485 'outputs': ['<(package_dir)/<(java_sample_src_lib)'],
489 '--src-dir=cronet/android/sample',
490 '--jar-path=<(package_dir)/<(java_sample_src_lib)',
494 'action_name': 'generate licenses',
495 'inputs': ['cronet/tools/cronet_licenses.py'] ,
496 'outputs': ['<(package_dir)/LICENSE'],
507 'destination': '<(package_dir)',
511 'cronet/android/proguard.cfg',
512 '<(lib_java_dir)/<(java_stub_lib)'
516 'destination': '<(package_dir)/symbols/<(android_app_abi)',
518 '<(SHARED_LIB_DIR)/<(native_lib)',
524 }], # OS=="android" and use_icu_alternatives_on_android==1