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',
152 'type': 'static_library',
154 'USE_ICU_ALTERNATIVES_ON_ANDROID=1',
155 'DISABLE_FILE_SUPPORT=1',
156 'DISABLE_FTP_SUPPORT=1',
159 '../net/net.gyp:net_small',
162 ['enable_data_reduction_proxy_support==1',
165 '../components/components.gyp:data_reduction_proxy_core_browser_small',
170 'includes': [ 'cronet/cronet_static.gypi' ],
173 # cronet_static target depends on ICU and includes file and ftp support.
174 'target_name': 'cronet_static',
175 'type': 'static_library',
177 '../base/base.gyp:base_i18n',
178 '../net/net.gyp:net',
181 ['enable_data_reduction_proxy_support==1',
184 '../components/components.gyp:data_reduction_proxy_core_browser',
189 'includes': [ 'cronet/cronet_static.gypi' ],
192 'target_name': 'libcronet',
193 'type': 'shared_library',
195 'cronet/android/cronet_jni.cc',
198 'cronet_static_small',
199 '../base/base.gyp:base',
200 '../net/net.gyp:net_small',
201 '../url/url.gyp:url_lib_use_icu_alternatives_on_android',
204 { # cronet_api.jar defines Cronet API and provides implementation of
205 # legacy api using HttpUrlConnection (not the Chromium stack).
206 'target_name': 'cronet_api',
209 'cronet_url_request_context_config_list',
214 'java_in_dir': 'cronet/android/java',
216 '**/ChunkedWritableByteChannel.java',
217 '**/ExtendedResponseInfo.java',
218 '**/HistogramManager.java',
219 '**/HttpUrlConnection*.java',
220 '**/HttpUrlRequest*.java',
222 '**/RequestStatus.java',
223 '**/ResponseInfo.java',
224 '**/ResponseTooLargeException.java',
225 '**/StatusListener.java',
226 '**/UploadDataProvider.java',
227 '**/UploadDataSink.java',
228 '**/UrlRequest.java',
229 '**/UrlRequestContext.java',
230 '**/UrlRequestContextConfig.java',
231 '**/UrlRequestContextConfigList.java',
232 '**/UrlRequestException.java',
233 '**/UrlRequestListener.java',
238 'includes': [ '../build/java.gypi' ],
240 { # cronet.jar implements HttpUrlRequest interface using Chromium stack
241 # in native libcronet.so library.
242 'target_name': 'cronet_java',
245 '../base/base.gyp:base',
247 'cronet_url_request_java',
249 'net_request_priority_java',
252 'java_in_dir': 'cronet/android/java',
254 '**/ChromiumAsyncUrlRequest.java',
255 '**/ChromiumUrlRequest.java',
256 '**/ChromiumUrlRequestContext.java',
257 '**/ChromiumUrlRequestError.java',
258 '**/ChromiumUrlRequestFactory.java',
259 '**/ChromiumUrlRequestPriority.java',
260 '**/CronetHistogramManager.java',
261 '**/CronetResponseInfo.java',
262 '**/CronetLibraryLoader.java',
263 '**/CronetUploadDataStream.java',
264 '**/CronetUrlRequest.java',
265 '**/CronetUrlRequestContext.java',
266 '**/CronetUrlRequestFactory.java',
267 '**/RequestPriority.java',
268 '**/urlconnection/CronetBufferedOutputStream.java',
269 '**/urlconnection/CronetChunkedOutputStream.java',
270 '**/urlconnection/CronetFixedModeOutputStream.java',
271 '**/urlconnection/CronetInputStream.java',
272 '**/urlconnection/CronetHttpURLConnection.java',
273 '**/urlconnection/CronetHttpURLStreamHandler.java',
274 '**/urlconnection/CronetOutputStream.java',
275 '**/urlconnection/CronetURLStreamHandlerFactory.java',
276 '**/urlconnection/MessageLoop.java',
279 'includes': [ '../build/java.gypi' ],
282 'target_name': 'cronet_sample_apk',
289 'apk_name': 'CronetSample',
290 'java_in_dir': 'cronet/android/sample',
291 'resource_dir': 'cronet/android/sample/res',
292 'native_lib_target': 'libcronet',
293 'proguard_enabled': 'true',
294 'proguard_flags_paths': [
295 'cronet/android/proguard.cfg',
296 'cronet/android/sample/javatests/proguard.cfg',
299 'includes': [ '../build/java_apk.gypi' ],
302 # cronet_sample_apk creates a .jar as a side effect. Any java targets
303 # that need that .jar in their classpath should depend on this target,
304 # cronet_sample_apk_java. Dependents of cronet_sample_apk receive its
305 # jar path in the variable 'apk_output_jar_path'. This target should
306 # only be used by targets which instrument cronet_sample_apk.
307 'target_name': 'cronet_sample_apk_java',
312 'includes': [ '../build/apk_fake_jar.gypi' ],
315 'target_name': 'cronet_sample_test_apk',
319 'cronet_sample_apk_java',
321 '../base/base.gyp:base_java_test_support',
324 'apk_name': 'CronetSampleTest',
325 'java_in_dir': 'cronet/android/sample/javatests',
328 'includes': [ '../build/java_apk.gypi' ],
331 'target_name': 'cronet_tests_jni_headers',
334 'cronet/android/test/src/org/chromium/net/CronetTestUtil.java',
335 'cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java',
336 'cronet/android/test/src/org/chromium/net/NativeTestServer.java',
337 'cronet/android/test/src/org/chromium/net/NetworkChangeNotifierUtil.java',
338 'cronet/android/test/src/org/chromium/net/QuicTestServer.java',
339 'cronet/android/test/src/org/chromium/net/SdchObserver.java',
340 'cronet/android/test/src/org/chromium/net/TestUploadDataStreamHandler.java',
343 'jni_gen_package': 'cronet_tests',
345 'includes': [ '../build/jni_generator.gypi' ],
348 'target_name': 'libcronet_tests',
349 'type': 'shared_library',
351 'cronet/android/test/cronet_test_jni.cc',
352 'cronet/android/test/mock_url_request_job_factory.cc',
353 'cronet/android/test/mock_url_request_job_factory.h',
354 'cronet/android/test/native_test_server.cc',
355 'cronet/android/test/native_test_server.h',
356 'cronet/android/test/quic_test_server.cc',
357 'cronet/android/test/quic_test_server.h',
358 'cronet/android/test/sdch_test_util.cc',
359 'cronet/android/test/sdch_test_util.h',
360 'cronet/android/test/test_upload_data_stream_handler.cc',
361 'cronet/android/test/test_upload_data_stream_handler.h',
362 'cronet/android/test/network_change_notifier_util.cc',
363 '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',
381 ['enable_data_reduction_proxy_support==1',
384 '../components/components.gyp:data_reduction_proxy_core_browser',
389 'includes': [ 'cronet/cronet_static.gypi' ],
392 'target_name': 'cronet_test_apk',
396 '../net/net.gyp:net_java_test_support',
399 'apk_name': 'CronetTest',
400 'java_in_dir': 'cronet/android/test',
401 'resource_dir': 'cronet/android/test/res',
402 'asset_location': 'cronet/android/test/assets',
403 'native_lib_target': 'libcronet_tests',
405 'includes': [ '../build/java_apk.gypi' ],
408 # cronet_test_apk creates a .jar as a side effect. Any java targets
409 # that need that .jar in their classpath should depend on this target,
410 # cronet_test_apk_java. Dependents of cronet_test_apk receive its
411 # jar path in the variable 'apk_output_jar_path'. This target should
412 # only be used by targets which instrument cronet_test_apk.
413 'target_name': 'cronet_test_apk_java',
418 'includes': [ '../build/apk_fake_jar.gypi' ],
421 'target_name': 'cronet_test_instrumentation_apk',
424 'cronet_test_apk_java',
425 '../base/base.gyp:base_java_test_support',
428 'apk_name': 'CronetTestInstrumentation',
429 'java_in_dir': 'cronet/android/test/javatests',
430 'resource_dir': 'cronet/android/test/res',
433 'includes': [ '../build/java_apk.gypi' ],
436 'target_name': 'cronet_perf_test_apk',
443 'apk_name': 'CronetPerfTest',
444 'java_in_dir': 'cronet/android/test/javaperftests',
446 'native_lib_target': 'libcronet',
447 'proguard_enabled': 'true',
448 'proguard_flags_paths': [
449 'cronet/android/proguard.cfg',
452 'includes': [ '../build/java_apk.gypi' ],
455 'target_name': 'cronet_package',
461 '../net/net.gyp:net_unittests_apk',
464 'native_lib': 'libcronet.>(android_product_extension)',
465 'java_lib': 'cronet.jar',
466 'java_api_lib': 'cronet_api.jar',
467 'java_src_lib': 'cronet-src.jar',
468 'java_sample_src_lib': 'cronet-sample-src.jar',
469 'lib_java_dir': '<(PRODUCT_DIR)/lib.java',
470 'package_dir': '<(PRODUCT_DIR)/cronet',
471 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/cronet',
472 'jar_extract_dir': '<(intermediate_dir)/cronet_jar_extract',
473 'jar_extract_stamp': '<(intermediate_dir)/jar_extract.stamp',
474 'cronet_jar_stamp': '<(intermediate_dir)/cronet_jar.stamp',
478 'action_name': 'strip libcronet',
479 'inputs': ['<(SHARED_LIB_DIR)/<(native_lib)'],
480 'outputs': ['<(package_dir)/libs/<(android_app_abi)/<(native_lib)'],
490 'action_name': 'extracting from jars',
492 '<(lib_java_dir)/cronet_java.jar',
493 '<(lib_java_dir)/base_java.jar',
494 '<(lib_java_dir)/net_java.jar',
495 '<(lib_java_dir)/url_java.jar',
497 'outputs': ['<(jar_extract_stamp)', '<(jar_extract_dir)'],
500 'cronet/tools/extract_from_jars.py',
501 '--classes-dir=<(jar_extract_dir)',
502 '--jars=<@(_inputs)',
503 '--stamp=<(jar_extract_stamp)',
507 'action_name': 'jar_<(_target_name)',
508 'message': 'Creating <(_target_name) jar',
510 '<(DEPTH)/build/android/gyp/util/build_utils.py',
511 '<(DEPTH)/build/android/gyp/util/md5_check.py',
512 '<(DEPTH)/build/android/gyp/jar.py',
513 '<(jar_extract_stamp)',
516 '<(package_dir)/<(java_lib)',
517 '<(cronet_jar_stamp)',
520 'python', '<(DEPTH)/build/android/gyp/jar.py',
521 '--classes-dir=<(jar_extract_dir)',
522 '--jar-path=<(package_dir)/<(java_lib)',
523 '--stamp=<(cronet_jar_stamp)',
527 'action_name': 'jar_src_<(_target_name)',
528 'inputs': ['cronet/tools/jar_src.py'] ,
529 'outputs': ['<(package_dir)/<(java_src_lib)'],
533 '--src-dir=cronet/android/java/src',
534 '--jar-path=<(package_dir)/<(java_src_lib)',
538 'action_name': 'jar_sample_src_<(_target_name)',
539 'inputs': ['cronet/tools/jar_src.py'] ,
540 'outputs': ['<(package_dir)/<(java_sample_src_lib)'],
544 '--src-dir=cronet/android/sample',
545 '--jar-path=<(package_dir)/<(java_sample_src_lib)',
549 'action_name': 'generate licenses',
550 'inputs': ['cronet/tools/cronet_licenses.py'] ,
551 'outputs': ['<(package_dir)/LICENSE'],
560 'action_name': 'generate javadoc',
561 'inputs': ['cronet/tools/generate_javadoc.py'] ,
562 'outputs': ['<(package_dir)/javadoc'],
567 '--output-dir=<(package_dir)/javadoc',
568 '--working-dir=cronet/android/java',
570 'message': 'Generating Javadoc',
575 'destination': '<(package_dir)',
579 'cronet/android/proguard.cfg',
580 '<(lib_java_dir)/<(java_api_lib)'
584 'destination': '<(package_dir)/symbols/<(android_app_abi)',
586 '<(SHARED_LIB_DIR)/<(native_lib)',
593 'enable_data_reduction_proxy_support%': 0,