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': 'cronet_version',
59 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
60 'version_py_path': '<(DEPTH)/build/util/version.py',
61 'version_path': '<(DEPTH)/chrome/VERSION',
62 'template_input_path': 'cronet/android/java/src/org/chromium/net/Version.template',
63 'output_path': '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)/org/chromium/cronet/Version.java',
65 'direct_dependent_settings': {
67 # Ensure that the output directory is used in the class path
68 # when building targets that depend on this one.
69 'generated_src_dirs': [
70 '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)',
72 # Ensure dependents are rebuilt when the generated Java file changes.
73 'additional_input_paths': [
80 'action_name': 'cronet_version',
82 '<(template_input_path)',
92 '-f', '<(version_path)',
93 '-f', '<(lastchange_path)',
94 '<(template_input_path)',
97 'message': 'Generating version information',
102 'target_name': 'cronet_version_header',
104 # Need to set hard_depency flag because cronet_version generates a
106 'hard_dependency': 1,
107 'direct_dependent_settings': {
109 '<(SHARED_INTERMEDIATE_DIR)/',
114 'action_name': 'version_header',
115 'message': 'Generating version header file: <@(_outputs)',
118 'cronet/version.h.in',
121 '<(SHARED_INTERMEDIATE_DIR)/components/cronet/version.h',
125 '<(version_py_path)',
126 '-e', 'VERSION_FULL="<(version_full)"',
127 'cronet/version.h.in',
131 '../build/util/version.gypi',
137 # cronet_static_small target has reduced binary size through using
138 # ICU alternatives which requires file and ftp support be disabled.
139 'target_name': 'cronet_static_small',
141 'USE_ICU_ALTERNATIVES_ON_ANDROID=1',
142 'DISABLE_FILE_SUPPORT=1',
143 'DISABLE_FTP_SUPPORT=1',
146 '../net/net.gyp:net_small',
148 'includes': [ 'cronet/cronet_static.gypi' ],
150 ['enable_data_reduction_proxy_support==1',
153 '../components/components.gyp:data_reduction_proxy_core_browser_small',
160 # cronet_static target depends on ICU and includes file and ftp support.
161 'target_name': 'cronet_static',
163 '../base/base.gyp:base_i18n',
164 '../net/net.gyp:net',
166 'includes': [ 'cronet/cronet_static.gypi' ],
168 ['enable_data_reduction_proxy_support==1',
171 '../components/components.gyp:data_reduction_proxy_core_browser',
178 'target_name': 'libcronet',
179 'type': 'shared_library',
181 'cronet/android/cronet_jni.cc',
184 'cronet_static_small',
185 '../base/base.gyp:base',
186 '../net/net.gyp:net_small',
187 '../url/url.gyp:url_lib_use_icu_alternatives_on_android',
190 { # cronet_api.jar defines Cronet API and provides implementation of
191 # legacy api using HttpUrlConnection (not the Chromium stack).
192 'target_name': 'cronet_api',
195 'cronet_url_request_context_config_list',
199 'java_in_dir': 'cronet/android/java',
201 '**/ChunkedWritableByteChannel.java',
202 '**/ExtendedResponseInfo.java',
203 '**/HistogramManager.java',
204 '**/HttpUrlConnection*.java',
205 '**/HttpUrlRequest*.java',
206 '**/ResponseInfo.java',
207 '**/ResponseTooLargeException.java',
208 '**/UploadDataProvider.java',
209 '**/UploadDataSink.java',
210 '**/UrlRequest.java',
211 '**/UrlRequestContext.java',
212 '**/UrlRequestContextConfig.java',
213 '**/UrlRequestContextConfigList.java',
214 '**/UrlRequestException.java',
215 '**/UrlRequestListener.java',
220 'includes': [ '../build/java.gypi' ],
222 { # cronet.jar implements HttpUrlRequest interface using Chromium stack
223 # in native libcronet.so library.
224 'target_name': 'cronet_java',
227 '../base/base.gyp:base',
229 'cronet_url_request_java',
231 'net_request_priority_java',
234 'java_in_dir': 'cronet/android/java',
236 '**/ChromiumAsyncUrlRequest.java',
237 '**/ChromiumUrlRequest.java',
238 '**/ChromiumUrlRequestContext.java',
239 '**/ChromiumUrlRequestError.java',
240 '**/ChromiumUrlRequestFactory.java',
241 '**/ChromiumUrlRequestPriority.java',
242 '**/CronetHistogramManager.java',
243 '**/CronetResponseInfo.java',
244 '**/CronetLibraryLoader.java',
245 '**/CronetUploadDataStream.java',
246 '**/CronetUrlRequest.java',
247 '**/CronetUrlRequestContext.java',
248 '**/CronetUrlRequestFactory.java',
249 '**/RequestPriority.java',
250 '**/urlconnection/CronetBufferedOutputStream.java',
251 '**/urlconnection/CronetFixedModeOutputStream.java',
252 '**/urlconnection/CronetInputStream.java',
253 '**/urlconnection/CronetHttpURLConnection.java',
254 '**/urlconnection/CronetHttpURLStreamHandler.java',
255 '**/urlconnection/CronetOutputStream.java',
256 '**/urlconnection/CronetURLStreamHandlerFactory.java',
257 '**/urlconnection/MessageLoop.java',
260 'includes': [ '../build/java.gypi' ],
263 'target_name': 'cronet_sample_apk',
270 'apk_name': 'CronetSample',
271 'java_in_dir': 'cronet/android/sample',
272 'resource_dir': 'cronet/android/sample/res',
273 'native_lib_target': 'libcronet',
274 'proguard_enabled': 'true',
275 'proguard_flags_paths': [
276 'cronet/android/proguard.cfg',
277 'cronet/android/sample/javatests/proguard.cfg',
280 'includes': [ '../build/java_apk.gypi' ],
283 # cronet_sample_apk creates a .jar as a side effect. Any java targets
284 # that need that .jar in their classpath should depend on this target,
285 # cronet_sample_apk_java. Dependents of cronet_sample_apk receive its
286 # jar path in the variable 'apk_output_jar_path'. This target should
287 # only be used by targets which instrument cronet_sample_apk.
288 'target_name': 'cronet_sample_apk_java',
293 'includes': [ '../build/apk_fake_jar.gypi' ],
296 'target_name': 'cronet_sample_test_apk',
300 'cronet_sample_apk_java',
302 '../base/base.gyp:base_java_test_support',
305 'apk_name': 'CronetSampleTest',
306 'java_in_dir': 'cronet/android/sample/javatests',
307 'resource_dir': 'cronet/android/sample/res',
310 'includes': [ '../build/java_apk.gypi' ],
313 'target_name': 'cronet_tests_jni_headers',
316 'cronet/android/test/src/org/chromium/net/CronetTestUtil.java',
317 'cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java',
318 'cronet/android/test/src/org/chromium/net/NativeTestServer.java',
319 'cronet/android/test/src/org/chromium/net/NetworkChangeNotifierUtil.java',
320 'cronet/android/test/src/org/chromium/net/QuicTestServer.java',
321 'cronet/android/test/src/org/chromium/net/SdchObserver.java',
322 'cronet/android/test/src/org/chromium/net/TestUploadDataStreamHandler.java',
325 'jni_gen_package': 'cronet_tests',
327 'includes': [ '../build/jni_generator.gypi' ],
330 'target_name': 'libcronet_tests',
331 'type': 'shared_library',
333 'cronet/android/test/cronet_test_jni.cc',
334 'cronet/android/test/mock_url_request_job_factory.cc',
335 'cronet/android/test/mock_url_request_job_factory.h',
336 'cronet/android/test/native_test_server.cc',
337 'cronet/android/test/native_test_server.h',
338 'cronet/android/test/quic_test_server.cc',
339 'cronet/android/test/quic_test_server.h',
340 'cronet/android/test/sdch_test_util.cc',
341 'cronet/android/test/sdch_test_util.h',
342 'cronet/android/test/test_upload_data_stream_handler.cc',
343 'cronet/android/test/test_upload_data_stream_handler.h',
344 'cronet/android/test/network_change_notifier_util.cc',
345 'cronet/android/test/network_change_notifier_util.h',
349 'cronet_tests_jni_headers',
350 '../base/base.gyp:base',
351 '../net/net.gyp:net',
352 '../net/net.gyp:net_quic_proto',
353 '../net/net.gyp:net_test_support',
354 '../net/net.gyp:simple_quic_tools',
355 '../url/url.gyp:url_lib',
356 '../base/base.gyp:base_i18n',
357 '../third_party/icu/icu.gyp:icui18n',
358 '../third_party/icu/icu.gyp:icuuc',
361 ['enable_data_reduction_proxy_support==1',
364 'DATA_REDUCTION_PROXY_SUPPORT'
371 'target_name': 'cronet_test_apk',
375 '../net/net.gyp:net_java_test_support',
378 'apk_name': 'CronetTest',
379 'java_in_dir': 'cronet/android/test',
380 'resource_dir': 'cronet/android/test/res',
381 'asset_location': 'cronet/android/test/assets',
382 'native_lib_target': 'libcronet_tests',
384 'includes': [ '../build/java_apk.gypi' ],
387 # cronet_test_apk creates a .jar as a side effect. Any java targets
388 # that need that .jar in their classpath should depend on this target,
389 # cronet_test_apk_java. Dependents of cronet_test_apk receive its
390 # jar path in the variable 'apk_output_jar_path'. This target should
391 # only be used by targets which instrument cronet_test_apk.
392 'target_name': 'cronet_test_apk_java',
397 'includes': [ '../build/apk_fake_jar.gypi' ],
400 'target_name': 'cronet_test_instrumentation_apk',
403 'cronet_test_apk_java',
404 '../base/base.gyp:base_java_test_support',
407 'apk_name': 'CronetTestInstrumentation',
408 'java_in_dir': 'cronet/android/test/javatests',
409 'resource_dir': 'cronet/android/test/res',
412 'includes': [ '../build/java_apk.gypi' ],
415 'target_name': 'cronet_perf_test_apk',
422 'apk_name': 'CronetPerfTest',
423 'java_in_dir': 'cronet/android/test/javaperftests',
425 'native_lib_target': 'libcronet',
426 'proguard_enabled': 'true',
427 'proguard_flags_paths': [
428 'cronet/android/proguard.cfg',
431 'includes': [ '../build/java_apk.gypi' ],
434 'target_name': 'cronet_package',
440 '../net/net.gyp:net_unittests_apk',
443 'native_lib': 'libcronet.>(android_product_extension)',
444 'java_lib': 'cronet.jar',
445 'java_api_lib': 'cronet_api.jar',
446 'java_src_lib': 'cronet-src.jar',
447 'java_sample_src_lib': 'cronet-sample-src.jar',
448 'lib_java_dir': '<(PRODUCT_DIR)/lib.java',
449 'package_dir': '<(PRODUCT_DIR)/cronet',
450 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/cronet',
451 'jar_extract_dir': '<(intermediate_dir)/cronet_jar_extract',
452 'jar_extract_stamp': '<(intermediate_dir)/jar_extract.stamp',
453 'cronet_jar_stamp': '<(intermediate_dir)/cronet_jar.stamp',
457 'action_name': 'strip libcronet',
458 'inputs': ['<(SHARED_LIB_DIR)/<(native_lib)'],
459 'outputs': ['<(package_dir)/libs/<(android_app_abi)/<(native_lib)'],
469 'action_name': 'extracting from jars',
471 '<(lib_java_dir)/cronet_java.jar',
472 '<(lib_java_dir)/base_java.jar',
473 '<(lib_java_dir)/net_java.jar',
474 '<(lib_java_dir)/url_java.jar',
476 'outputs': ['<(jar_extract_stamp)', '<(jar_extract_dir)'],
479 'cronet/tools/extract_from_jars.py',
480 '--classes-dir=<(jar_extract_dir)',
481 '--jars=<@(_inputs)',
482 '--stamp=<(jar_extract_stamp)',
486 'action_name': 'jar_<(_target_name)',
487 'message': 'Creating <(_target_name) jar',
489 '<(DEPTH)/build/android/gyp/util/build_utils.py',
490 '<(DEPTH)/build/android/gyp/util/md5_check.py',
491 '<(DEPTH)/build/android/gyp/jar.py',
492 '<(jar_extract_stamp)',
495 '<(package_dir)/<(java_lib)',
496 '<(cronet_jar_stamp)',
499 'python', '<(DEPTH)/build/android/gyp/jar.py',
500 '--classes-dir=<(jar_extract_dir)',
501 '--jar-path=<(package_dir)/<(java_lib)',
502 '--stamp=<(cronet_jar_stamp)',
506 'action_name': 'jar_src_<(_target_name)',
507 'inputs': ['cronet/tools/jar_src.py'] ,
508 'outputs': ['<(package_dir)/<(java_src_lib)'],
512 '--src-dir=cronet/android/java/src',
513 '--jar-path=<(package_dir)/<(java_src_lib)',
517 'action_name': 'jar_sample_src_<(_target_name)',
518 'inputs': ['cronet/tools/jar_src.py'] ,
519 'outputs': ['<(package_dir)/<(java_sample_src_lib)'],
523 '--src-dir=cronet/android/sample',
524 '--jar-path=<(package_dir)/<(java_sample_src_lib)',
528 'action_name': 'generate licenses',
529 'inputs': ['cronet/tools/cronet_licenses.py'] ,
530 'outputs': ['<(package_dir)/LICENSE'],
539 'action_name': 'generate javadoc',
540 'inputs': ['cronet/tools/generate_javadoc.py'] ,
541 'outputs': ['<(package_dir)/javadoc'],
546 '--output-dir=<(package_dir)/javadoc',
547 '--working-dir=cronet/android/java',
549 'message': 'Generating Javadoc',
554 'destination': '<(package_dir)',
558 'cronet/android/proguard.cfg',
559 '<(lib_java_dir)/<(java_api_lib)'
563 'destination': '<(package_dir)/symbols/<(android_app_abi)',
565 '<(SHARED_LIB_DIR)/<(native_lib)',
572 'enable_data_reduction_proxy_support%': 0,