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/CronetChunkedOutputStream.java',
268 '**/urlconnection/CronetFixedModeOutputStream.java',
269 '**/urlconnection/CronetInputStream.java',
270 '**/urlconnection/CronetHttpURLConnection.java',
271 '**/urlconnection/CronetHttpURLStreamHandler.java',
272 '**/urlconnection/CronetOutputStream.java',
273 '**/urlconnection/CronetURLStreamHandlerFactory.java',
274 '**/urlconnection/MessageLoop.java',
277 'includes': [ '../build/java.gypi' ],
280 'target_name': 'cronet_sample_apk',
287 'apk_name': 'CronetSample',
288 'java_in_dir': 'cronet/android/sample',
289 'resource_dir': 'cronet/android/sample/res',
290 'native_lib_target': 'libcronet',
291 'proguard_enabled': 'true',
292 'proguard_flags_paths': [
293 'cronet/android/proguard.cfg',
294 'cronet/android/sample/javatests/proguard.cfg',
297 'includes': [ '../build/java_apk.gypi' ],
300 # cronet_sample_apk creates a .jar as a side effect. Any java targets
301 # that need that .jar in their classpath should depend on this target,
302 # cronet_sample_apk_java. Dependents of cronet_sample_apk receive its
303 # jar path in the variable 'apk_output_jar_path'. This target should
304 # only be used by targets which instrument cronet_sample_apk.
305 'target_name': 'cronet_sample_apk_java',
310 'includes': [ '../build/apk_fake_jar.gypi' ],
313 'target_name': 'cronet_sample_test_apk',
317 'cronet_sample_apk_java',
319 '../base/base.gyp:base_java_test_support',
322 'apk_name': 'CronetSampleTest',
323 'java_in_dir': 'cronet/android/sample/javatests',
324 'resource_dir': 'cronet/android/sample/res',
327 'includes': [ '../build/java_apk.gypi' ],
330 'target_name': 'cronet_tests_jni_headers',
333 'cronet/android/test/src/org/chromium/net/CronetTestUtil.java',
334 'cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java',
335 'cronet/android/test/src/org/chromium/net/NativeTestServer.java',
336 'cronet/android/test/src/org/chromium/net/NetworkChangeNotifierUtil.java',
337 'cronet/android/test/src/org/chromium/net/QuicTestServer.java',
338 'cronet/android/test/src/org/chromium/net/SdchObserver.java',
339 'cronet/android/test/src/org/chromium/net/TestUploadDataStreamHandler.java',
342 'jni_gen_package': 'cronet_tests',
344 'includes': [ '../build/jni_generator.gypi' ],
347 'target_name': 'libcronet_tests',
348 'type': 'shared_library',
350 'cronet/android/test/cronet_test_jni.cc',
351 'cronet/android/test/mock_url_request_job_factory.cc',
352 'cronet/android/test/mock_url_request_job_factory.h',
353 'cronet/android/test/native_test_server.cc',
354 'cronet/android/test/native_test_server.h',
355 'cronet/android/test/quic_test_server.cc',
356 'cronet/android/test/quic_test_server.h',
357 'cronet/android/test/sdch_test_util.cc',
358 'cronet/android/test/sdch_test_util.h',
359 'cronet/android/test/test_upload_data_stream_handler.cc',
360 'cronet/android/test/test_upload_data_stream_handler.h',
361 'cronet/android/test/network_change_notifier_util.cc',
362 'cronet/android/test/network_change_notifier_util.h',
366 'cronet_tests_jni_headers',
367 '../base/base.gyp:base',
368 '../net/net.gyp:net',
369 '../net/net.gyp:net_quic_proto',
370 '../net/net.gyp:net_test_support',
371 '../net/net.gyp:simple_quic_tools',
372 '../url/url.gyp:url_lib',
373 '../base/base.gyp:base_i18n',
374 '../third_party/icu/icu.gyp:icui18n',
375 '../third_party/icu/icu.gyp:icuuc',
378 ['enable_data_reduction_proxy_support==1',
381 'DATA_REDUCTION_PROXY_SUPPORT'
388 'target_name': 'cronet_test_apk',
392 '../net/net.gyp:net_java_test_support',
395 'apk_name': 'CronetTest',
396 'java_in_dir': 'cronet/android/test',
397 'resource_dir': 'cronet/android/test/res',
398 'asset_location': 'cronet/android/test/assets',
399 'native_lib_target': 'libcronet_tests',
401 'includes': [ '../build/java_apk.gypi' ],
404 # cronet_test_apk creates a .jar as a side effect. Any java targets
405 # that need that .jar in their classpath should depend on this target,
406 # cronet_test_apk_java. Dependents of cronet_test_apk receive its
407 # jar path in the variable 'apk_output_jar_path'. This target should
408 # only be used by targets which instrument cronet_test_apk.
409 'target_name': 'cronet_test_apk_java',
414 'includes': [ '../build/apk_fake_jar.gypi' ],
417 'target_name': 'cronet_test_instrumentation_apk',
420 'cronet_test_apk_java',
421 '../base/base.gyp:base_java_test_support',
424 'apk_name': 'CronetTestInstrumentation',
425 'java_in_dir': 'cronet/android/test/javatests',
426 'resource_dir': 'cronet/android/test/res',
429 'includes': [ '../build/java_apk.gypi' ],
432 'target_name': 'cronet_perf_test_apk',
439 'apk_name': 'CronetPerfTest',
440 'java_in_dir': 'cronet/android/test/javaperftests',
442 'native_lib_target': 'libcronet',
443 'proguard_enabled': 'true',
444 'proguard_flags_paths': [
445 'cronet/android/proguard.cfg',
448 'includes': [ '../build/java_apk.gypi' ],
451 'target_name': 'cronet_package',
457 '../net/net.gyp:net_unittests_apk',
460 'native_lib': 'libcronet.>(android_product_extension)',
461 'java_lib': 'cronet.jar',
462 'java_api_lib': 'cronet_api.jar',
463 'java_src_lib': 'cronet-src.jar',
464 'java_sample_src_lib': 'cronet-sample-src.jar',
465 'lib_java_dir': '<(PRODUCT_DIR)/lib.java',
466 'package_dir': '<(PRODUCT_DIR)/cronet',
467 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/cronet',
468 'jar_extract_dir': '<(intermediate_dir)/cronet_jar_extract',
469 'jar_extract_stamp': '<(intermediate_dir)/jar_extract.stamp',
470 'cronet_jar_stamp': '<(intermediate_dir)/cronet_jar.stamp',
474 'action_name': 'strip libcronet',
475 'inputs': ['<(SHARED_LIB_DIR)/<(native_lib)'],
476 'outputs': ['<(package_dir)/libs/<(android_app_abi)/<(native_lib)'],
486 'action_name': 'extracting from jars',
488 '<(lib_java_dir)/cronet_java.jar',
489 '<(lib_java_dir)/base_java.jar',
490 '<(lib_java_dir)/net_java.jar',
491 '<(lib_java_dir)/url_java.jar',
493 'outputs': ['<(jar_extract_stamp)', '<(jar_extract_dir)'],
496 'cronet/tools/extract_from_jars.py',
497 '--classes-dir=<(jar_extract_dir)',
498 '--jars=<@(_inputs)',
499 '--stamp=<(jar_extract_stamp)',
503 'action_name': 'jar_<(_target_name)',
504 'message': 'Creating <(_target_name) jar',
506 '<(DEPTH)/build/android/gyp/util/build_utils.py',
507 '<(DEPTH)/build/android/gyp/util/md5_check.py',
508 '<(DEPTH)/build/android/gyp/jar.py',
509 '<(jar_extract_stamp)',
512 '<(package_dir)/<(java_lib)',
513 '<(cronet_jar_stamp)',
516 'python', '<(DEPTH)/build/android/gyp/jar.py',
517 '--classes-dir=<(jar_extract_dir)',
518 '--jar-path=<(package_dir)/<(java_lib)',
519 '--stamp=<(cronet_jar_stamp)',
523 'action_name': 'jar_src_<(_target_name)',
524 'inputs': ['cronet/tools/jar_src.py'] ,
525 'outputs': ['<(package_dir)/<(java_src_lib)'],
529 '--src-dir=cronet/android/java/src',
530 '--jar-path=<(package_dir)/<(java_src_lib)',
534 'action_name': 'jar_sample_src_<(_target_name)',
535 'inputs': ['cronet/tools/jar_src.py'] ,
536 'outputs': ['<(package_dir)/<(java_sample_src_lib)'],
540 '--src-dir=cronet/android/sample',
541 '--jar-path=<(package_dir)/<(java_sample_src_lib)',
545 'action_name': 'generate licenses',
546 'inputs': ['cronet/tools/cronet_licenses.py'] ,
547 'outputs': ['<(package_dir)/LICENSE'],
556 'action_name': 'generate javadoc',
557 'inputs': ['cronet/tools/generate_javadoc.py'] ,
558 'outputs': ['<(package_dir)/javadoc'],
563 '--output-dir=<(package_dir)/javadoc',
564 '--working-dir=cronet/android/java',
566 'message': 'Generating Javadoc',
571 'destination': '<(package_dir)',
575 'cronet/android/proguard.cfg',
576 '<(lib_java_dir)/<(java_api_lib)'
580 'destination': '<(package_dir)/symbols/<(android_app_abi)',
582 '<(SHARED_LIB_DIR)/<(native_lib)',
589 'enable_data_reduction_proxy_support%': 0,