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/CronetUploadDataStream.java',
17 'cronet/android/java/src/org/chromium/net/CronetUrlRequest.java',
18 'cronet/android/java/src/org/chromium/net/CronetUrlRequestContext.java',
19 'cronet/android/java/src/org/chromium/net/ChromiumUrlRequest.java',
20 'cronet/android/java/src/org/chromium/net/ChromiumUrlRequestContext.java',
23 'jni_gen_package': 'cronet',
25 'includes': [ '../build/jni_generator.gypi' ],
28 'target_name': 'cronet_url_request_java',
31 'source_file': 'cronet/android/chromium_url_request.h',
33 'includes': [ '../build/android/java_cpp_enum.gypi' ],
36 'target_name': 'net_request_priority_java',
39 'source_file': '../net/base/request_priority.h',
41 'includes': [ '../build/android/java_cpp_enum.gypi' ],
44 'target_name': 'cronet_url_request_context_config_list',
47 'cronet/android/java/src/org/chromium/net/UrlRequestContextConfigList.template',
50 'package_name': 'org/chromium/cronet',
51 'template_deps': ['cronet/url_request_context_config_list.h'],
53 'includes': [ '../build/android/java_cpp_template.gypi' ],
56 'target_name': 'load_states_list',
59 'cronet/android/java/src/org/chromium/net/LoadState.template',
62 'package_name': 'org/chromium/cronet',
63 'template_deps': ['../net/base/load_states_list.h'],
65 'includes': [ '../build/android/java_cpp_template.gypi' ],
68 'target_name': 'cronet_version',
71 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
72 'version_py_path': '<(DEPTH)/build/util/version.py',
73 'version_path': '<(DEPTH)/chrome/VERSION',
74 'template_input_path': 'cronet/android/java/src/org/chromium/net/Version.template',
75 'output_path': '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)/org/chromium/cronet/Version.java',
77 'direct_dependent_settings': {
79 # Ensure that the output directory is used in the class path
80 # when building targets that depend on this one.
81 'generated_src_dirs': [
82 '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)',
84 # Ensure dependents are rebuilt when the generated Java file changes.
85 'additional_input_paths': [
92 'action_name': 'cronet_version',
94 '<(template_input_path)',
103 '<(version_py_path)',
104 '-f', '<(version_path)',
105 '-f', '<(lastchange_path)',
106 '<(template_input_path)',
109 'message': 'Generating version information',
114 'target_name': 'cronet_version_header',
116 # Need to set hard_depency flag because cronet_version generates a
118 'hard_dependency': 1,
119 'direct_dependent_settings': {
121 '<(SHARED_INTERMEDIATE_DIR)/',
126 'action_name': 'version_header',
127 'message': 'Generating version header file: <@(_outputs)',
130 'cronet/version.h.in',
133 '<(SHARED_INTERMEDIATE_DIR)/components/cronet/version.h',
137 '<(version_py_path)',
138 '-e', 'VERSION_FULL="<(version_full)"',
139 'cronet/version.h.in',
143 '../build/util/version.gypi',
149 # cronet_static_small target has reduced binary size through using
150 # ICU alternatives which requires file and ftp support be disabled.
151 'target_name': 'cronet_static_small',
153 'USE_ICU_ALTERNATIVES_ON_ANDROID=1',
154 'DISABLE_FILE_SUPPORT=1',
155 'DISABLE_FTP_SUPPORT=1',
158 '../net/net.gyp:net_small',
160 'includes': [ 'cronet/cronet_static.gypi' ],
162 ['enable_data_reduction_proxy_support==1',
165 '../components/components.gyp:data_reduction_proxy_core_browser_small',
172 # cronet_static target depends on ICU and includes file and ftp support.
173 'target_name': 'cronet_static',
175 '../base/base.gyp:base_i18n',
176 '../net/net.gyp:net',
178 'includes': [ 'cronet/cronet_static.gypi' ],
180 ['enable_data_reduction_proxy_support==1',
183 '../components/components.gyp:data_reduction_proxy_core_browser',
190 'target_name': 'libcronet',
191 'type': 'shared_library',
193 'cronet/android/cronet_jni.cc',
196 'cronet_static_small',
197 '../base/base.gyp:base',
198 '../net/net.gyp:net_small',
199 '../url/url.gyp:url_lib_use_icu_alternatives_on_android',
202 { # cronet_api.jar defines Cronet API and provides implementation of
203 # legacy api using HttpUrlConnection (not the Chromium stack).
204 'target_name': 'cronet_api',
207 'cronet_url_request_context_config_list',
212 'java_in_dir': 'cronet/android/java',
214 '**/ChunkedWritableByteChannel.java',
215 '**/ExtendedResponseInfo.java',
216 '**/HistogramManager.java',
217 '**/HttpUrlConnection*.java',
218 '**/HttpUrlRequest*.java',
220 '**/RequestStatus.java',
221 '**/ResponseInfo.java',
222 '**/ResponseTooLargeException.java',
223 '**/StatusListener.java',
224 '**/UploadDataProvider.java',
225 '**/UploadDataSink.java',
226 '**/UrlRequest.java',
227 '**/UrlRequestContext.java',
228 '**/UrlRequestContextConfig.java',
229 '**/UrlRequestContextConfigList.java',
230 '**/UrlRequestException.java',
231 '**/UrlRequestListener.java',
236 'includes': [ '../build/java.gypi' ],
238 { # cronet.jar implements HttpUrlRequest interface using Chromium stack
239 # in native libcronet.so library.
240 'target_name': 'cronet_java',
243 '../base/base.gyp:base',
245 'cronet_url_request_java',
247 'net_request_priority_java',
250 'java_in_dir': 'cronet/android/java',
252 '**/ChromiumAsyncUrlRequest.java',
253 '**/ChromiumUrlRequest.java',
254 '**/ChromiumUrlRequestContext.java',
255 '**/ChromiumUrlRequestError.java',
256 '**/ChromiumUrlRequestFactory.java',
257 '**/ChromiumUrlRequestPriority.java',
258 '**/CronetHistogramManager.java',
259 '**/CronetResponseInfo.java',
260 '**/CronetLibraryLoader.java',
261 '**/CronetUploadDataStream.java',
262 '**/CronetUrlRequest.java',
263 '**/CronetUrlRequestContext.java',
264 '**/CronetUrlRequestFactory.java',
265 '**/RequestPriority.java',
266 '**/urlconnection/CronetBufferedOutputStream.java',
267 '**/urlconnection/CronetFixedModeOutputStream.java',
268 '**/urlconnection/CronetInputStream.java',
269 '**/urlconnection/CronetHttpURLConnection.java',
270 '**/urlconnection/CronetHttpURLStreamHandler.java',
271 '**/urlconnection/CronetOutputStream.java',
272 '**/urlconnection/CronetURLStreamHandlerFactory.java',
273 '**/urlconnection/MessageLoop.java',
276 'includes': [ '../build/java.gypi' ],
279 'target_name': 'cronet_sample_apk',
286 'apk_name': 'CronetSample',
287 'java_in_dir': 'cronet/android/sample',
288 'resource_dir': 'cronet/android/sample/res',
289 'native_lib_target': 'libcronet',
290 'proguard_enabled': 'true',
291 'proguard_flags_paths': [
292 'cronet/android/proguard.cfg',
293 'cronet/android/sample/javatests/proguard.cfg',
296 'includes': [ '../build/java_apk.gypi' ],
299 # cronet_sample_apk creates a .jar as a side effect. Any java targets
300 # that need that .jar in their classpath should depend on this target,
301 # cronet_sample_apk_java. Dependents of cronet_sample_apk receive its
302 # jar path in the variable 'apk_output_jar_path'. This target should
303 # only be used by targets which instrument cronet_sample_apk.
304 'target_name': 'cronet_sample_apk_java',
309 'includes': [ '../build/apk_fake_jar.gypi' ],
312 'target_name': 'cronet_sample_test_apk',
316 'cronet_sample_apk_java',
318 '../base/base.gyp:base_java_test_support',
321 'apk_name': 'CronetSampleTest',
322 'java_in_dir': 'cronet/android/sample/javatests',
323 'resource_dir': 'cronet/android/sample/res',
326 'includes': [ '../build/java_apk.gypi' ],
329 'target_name': 'cronet_tests_jni_headers',
332 'cronet/android/test/src/org/chromium/net/CronetTestUtil.java',
333 'cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java',
334 'cronet/android/test/src/org/chromium/net/NativeTestServer.java',
335 'cronet/android/test/src/org/chromium/net/NetworkChangeNotifierUtil.java',
336 'cronet/android/test/src/org/chromium/net/QuicTestServer.java',
337 'cronet/android/test/src/org/chromium/net/SdchObserver.java',
338 'cronet/android/test/src/org/chromium/net/TestUploadDataStreamHandler.java',
341 'jni_gen_package': 'cronet_tests',
343 'includes': [ '../build/jni_generator.gypi' ],
346 'target_name': 'libcronet_tests',
347 'type': 'shared_library',
349 'cronet/android/test/cronet_test_jni.cc',
350 'cronet/android/test/mock_url_request_job_factory.cc',
351 'cronet/android/test/mock_url_request_job_factory.h',
352 'cronet/android/test/native_test_server.cc',
353 'cronet/android/test/native_test_server.h',
354 'cronet/android/test/quic_test_server.cc',
355 'cronet/android/test/quic_test_server.h',
356 'cronet/android/test/sdch_test_util.cc',
357 'cronet/android/test/sdch_test_util.h',
358 'cronet/android/test/test_upload_data_stream_handler.cc',
359 'cronet/android/test/test_upload_data_stream_handler.h',
360 'cronet/android/test/network_change_notifier_util.cc',
361 'cronet/android/test/network_change_notifier_util.h',
365 'cronet_tests_jni_headers',
366 '../base/base.gyp:base',
367 '../net/net.gyp:net',
368 '../net/net.gyp:net_quic_proto',
369 '../net/net.gyp:net_test_support',
370 '../net/net.gyp:simple_quic_tools',
371 '../url/url.gyp:url_lib',
372 '../base/base.gyp:base_i18n',
373 '../third_party/icu/icu.gyp:icui18n',
374 '../third_party/icu/icu.gyp:icuuc',
377 ['enable_data_reduction_proxy_support==1',
380 'DATA_REDUCTION_PROXY_SUPPORT'
387 'target_name': 'cronet_test_apk',
391 '../net/net.gyp:net_java_test_support',
394 'apk_name': 'CronetTest',
395 'java_in_dir': 'cronet/android/test',
396 'resource_dir': 'cronet/android/test/res',
397 'asset_location': 'cronet/android/test/assets',
398 'native_lib_target': 'libcronet_tests',
400 'includes': [ '../build/java_apk.gypi' ],
403 # cronet_test_apk creates a .jar as a side effect. Any java targets
404 # that need that .jar in their classpath should depend on this target,
405 # cronet_test_apk_java. Dependents of cronet_test_apk receive its
406 # jar path in the variable 'apk_output_jar_path'. This target should
407 # only be used by targets which instrument cronet_test_apk.
408 'target_name': 'cronet_test_apk_java',
413 'includes': [ '../build/apk_fake_jar.gypi' ],
416 'target_name': 'cronet_test_instrumentation_apk',
419 'cronet_test_apk_java',
420 '../base/base.gyp:base_java_test_support',
423 'apk_name': 'CronetTestInstrumentation',
424 'java_in_dir': 'cronet/android/test/javatests',
425 'resource_dir': 'cronet/android/test/res',
428 'includes': [ '../build/java_apk.gypi' ],
431 'target_name': 'cronet_perf_test_apk',
438 'apk_name': 'CronetPerfTest',
439 'java_in_dir': 'cronet/android/test/javaperftests',
441 'native_lib_target': 'libcronet',
442 'proguard_enabled': 'true',
443 'proguard_flags_paths': [
444 'cronet/android/proguard.cfg',
447 'includes': [ '../build/java_apk.gypi' ],
450 'target_name': 'cronet_package',
456 '../net/net.gyp:net_unittests_apk',
459 'native_lib': 'libcronet.>(android_product_extension)',
460 'java_lib': 'cronet.jar',
461 'java_api_lib': 'cronet_api.jar',
462 'java_src_lib': 'cronet-src.jar',
463 'java_sample_src_lib': 'cronet-sample-src.jar',
464 'lib_java_dir': '<(PRODUCT_DIR)/lib.java',
465 'package_dir': '<(PRODUCT_DIR)/cronet',
466 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/cronet',
467 'jar_extract_dir': '<(intermediate_dir)/cronet_jar_extract',
468 'jar_extract_stamp': '<(intermediate_dir)/jar_extract.stamp',
469 'cronet_jar_stamp': '<(intermediate_dir)/cronet_jar.stamp',
473 'action_name': 'strip libcronet',
474 'inputs': ['<(SHARED_LIB_DIR)/<(native_lib)'],
475 'outputs': ['<(package_dir)/libs/<(android_app_abi)/<(native_lib)'],
485 'action_name': 'extracting from jars',
487 '<(lib_java_dir)/cronet_java.jar',
488 '<(lib_java_dir)/base_java.jar',
489 '<(lib_java_dir)/net_java.jar',
490 '<(lib_java_dir)/url_java.jar',
492 'outputs': ['<(jar_extract_stamp)', '<(jar_extract_dir)'],
495 'cronet/tools/extract_from_jars.py',
496 '--classes-dir=<(jar_extract_dir)',
497 '--jars=<@(_inputs)',
498 '--stamp=<(jar_extract_stamp)',
502 'action_name': 'jar_<(_target_name)',
503 'message': 'Creating <(_target_name) jar',
505 '<(DEPTH)/build/android/gyp/util/build_utils.py',
506 '<(DEPTH)/build/android/gyp/util/md5_check.py',
507 '<(DEPTH)/build/android/gyp/jar.py',
508 '<(jar_extract_stamp)',
511 '<(package_dir)/<(java_lib)',
512 '<(cronet_jar_stamp)',
515 'python', '<(DEPTH)/build/android/gyp/jar.py',
516 '--classes-dir=<(jar_extract_dir)',
517 '--jar-path=<(package_dir)/<(java_lib)',
518 '--stamp=<(cronet_jar_stamp)',
522 'action_name': 'jar_src_<(_target_name)',
523 'inputs': ['cronet/tools/jar_src.py'] ,
524 'outputs': ['<(package_dir)/<(java_src_lib)'],
528 '--src-dir=cronet/android/java/src',
529 '--jar-path=<(package_dir)/<(java_src_lib)',
533 'action_name': 'jar_sample_src_<(_target_name)',
534 'inputs': ['cronet/tools/jar_src.py'] ,
535 'outputs': ['<(package_dir)/<(java_sample_src_lib)'],
539 '--src-dir=cronet/android/sample',
540 '--jar-path=<(package_dir)/<(java_sample_src_lib)',
544 'action_name': 'generate licenses',
545 'inputs': ['cronet/tools/cronet_licenses.py'] ,
546 'outputs': ['<(package_dir)/LICENSE'],
555 'action_name': 'generate javadoc',
556 'inputs': ['cronet/tools/generate_javadoc.py'] ,
557 'outputs': ['<(package_dir)/javadoc'],
562 '--output-dir=<(package_dir)/javadoc',
563 '--working-dir=cronet/android/java',
565 'message': 'Generating Javadoc',
570 'destination': '<(package_dir)',
574 'cronet/android/proguard.cfg',
575 '<(lib_java_dir)/<(java_api_lib)'
579 'destination': '<(package_dir)/symbols/<(android_app_abi)',
581 '<(SHARED_LIB_DIR)/<(native_lib)',
588 'enable_data_reduction_proxy_support%': 0,