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 # cronet_static_small target has reduced binary size through using
103 # ICU alternatives which requires file and ftp support be disabled.
104 'target_name': 'cronet_static_small',
106 'USE_ICU_ALTERNATIVES_ON_ANDROID=1',
107 'DISABLE_FILE_SUPPORT=1',
108 'DISABLE_FTP_SUPPORT=1',
111 '../net/net.gyp:net_small',
113 'includes': [ 'cronet/cronet_static.gypi' ],
115 ['enable_data_reduction_proxy_support==1',
118 '../components/components.gyp:data_reduction_proxy_core_browser_small',
125 # cronet_static target depends on ICU and includes file and ftp support.
126 'target_name': 'cronet_static',
128 '../base/base.gyp:base_i18n',
129 '../net/net.gyp:net',
131 'includes': [ 'cronet/cronet_static.gypi' ],
133 ['enable_data_reduction_proxy_support==1',
136 '../components/components.gyp:data_reduction_proxy_core_browser',
143 'target_name': 'libcronet',
144 'type': 'shared_library',
146 'cronet/android/cronet_jni.cc',
149 'cronet_static_small',
150 '../base/base.gyp:base',
151 '../net/net.gyp:net_small',
152 '../url/url.gyp:url_lib_use_icu_alternatives_on_android',
155 { # cronet_api.jar defines Cronet API and provides implementation of
156 # legacy api using HttpUrlConnection (not the Chromium stack).
157 'target_name': 'cronet_api',
160 'cronet_url_request_context_config_list',
164 'java_in_dir': 'cronet/android/java',
166 '**/ChunkedWritableByteChannel.java',
167 '**/ExtendedResponseInfo.java',
168 '**/HistogramManager.java',
169 '**/HttpUrlConnection*.java',
170 '**/HttpUrlRequest*.java',
171 '**/ResponseInfo.java',
172 '**/ResponseTooLargeException.java',
173 '**/UploadDataProvider.java',
174 '**/UploadDataSink.java',
175 '**/UrlRequest.java',
176 '**/UrlRequestContext.java',
177 '**/UrlRequestContextConfig.java',
178 '**/UrlRequestContextConfigList.java',
179 '**/UrlRequestException.java',
180 '**/UrlRequestListener.java',
185 'includes': [ '../build/java.gypi' ],
187 { # cronet.jar implements HttpUrlRequest interface using Chromium stack
188 # in native libcronet.so library.
189 'target_name': 'cronet_java',
192 '../base/base.gyp:base',
194 'cronet_url_request_java',
196 'net_request_priority_java',
199 'java_in_dir': 'cronet/android/java',
201 '**/ChromiumAsyncUrlRequest.java',
202 '**/ChromiumUrlRequest.java',
203 '**/ChromiumUrlRequestContext.java',
204 '**/ChromiumUrlRequestError.java',
205 '**/ChromiumUrlRequestFactory.java',
206 '**/ChromiumUrlRequestPriority.java',
207 '**/CronetHistogramManager.java',
208 '**/CronetResponseInfo.java',
209 '**/CronetLibraryLoader.java',
210 '**/CronetUploadDataStream.java',
211 '**/CronetUrlRequest.java',
212 '**/CronetUrlRequestContext.java',
213 '**/CronetUrlRequestFactory.java',
214 '**/RequestPriority.java',
215 '**/urlconnection/CronetBufferedOutputStream.java',
216 '**/urlconnection/CronetFixedModeOutputStream.java',
217 '**/urlconnection/CronetInputStream.java',
218 '**/urlconnection/CronetHttpURLConnection.java',
219 '**/urlconnection/CronetHttpURLStreamHandler.java',
220 '**/urlconnection/CronetOutputStream.java',
221 '**/urlconnection/CronetURLStreamHandlerFactory.java',
222 '**/urlconnection/MessageLoop.java',
225 'includes': [ '../build/java.gypi' ],
228 'target_name': 'cronet_sample_apk',
235 'apk_name': 'CronetSample',
236 'java_in_dir': 'cronet/android/sample',
237 'resource_dir': 'cronet/android/sample/res',
238 'native_lib_target': 'libcronet',
239 'proguard_enabled': 'true',
240 'proguard_flags_paths': [
241 'cronet/android/proguard.cfg',
242 'cronet/android/sample/javatests/proguard.cfg',
245 'includes': [ '../build/java_apk.gypi' ],
248 # cronet_sample_apk creates a .jar as a side effect. Any java targets
249 # that need that .jar in their classpath should depend on this target,
250 # cronet_sample_apk_java. Dependents of cronet_sample_apk receive its
251 # jar path in the variable 'apk_output_jar_path'. This target should
252 # only be used by targets which instrument cronet_sample_apk.
253 'target_name': 'cronet_sample_apk_java',
258 'includes': [ '../build/apk_fake_jar.gypi' ],
261 'target_name': 'cronet_sample_test_apk',
265 'cronet_sample_apk_java',
267 '../base/base.gyp:base_java_test_support',
270 'apk_name': 'CronetSampleTest',
271 'java_in_dir': 'cronet/android/sample/javatests',
272 'resource_dir': 'cronet/android/sample/res',
275 'includes': [ '../build/java_apk.gypi' ],
278 'target_name': 'cronet_tests_jni_headers',
281 'cronet/android/test/src/org/chromium/net/CronetTestUtil.java',
282 'cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java',
283 'cronet/android/test/src/org/chromium/net/NativeTestServer.java',
284 'cronet/android/test/src/org/chromium/net/NetworkChangeNotifierUtil.java',
285 'cronet/android/test/src/org/chromium/net/QuicTestServer.java',
286 'cronet/android/test/src/org/chromium/net/SdchObserver.java',
287 'cronet/android/test/src/org/chromium/net/TestUploadDataStreamHandler.java',
290 'jni_gen_package': 'cronet_tests',
292 'includes': [ '../build/jni_generator.gypi' ],
295 'target_name': 'libcronet_tests',
296 'type': 'shared_library',
298 'cronet/android/test/cronet_test_jni.cc',
299 'cronet/android/test/mock_url_request_job_factory.cc',
300 'cronet/android/test/mock_url_request_job_factory.h',
301 'cronet/android/test/native_test_server.cc',
302 'cronet/android/test/native_test_server.h',
303 'cronet/android/test/quic_test_server.cc',
304 'cronet/android/test/quic_test_server.h',
305 'cronet/android/test/sdch_test_util.cc',
306 'cronet/android/test/sdch_test_util.h',
307 'cronet/android/test/test_upload_data_stream_handler.cc',
308 'cronet/android/test/test_upload_data_stream_handler.h',
309 'cronet/android/test/network_change_notifier_util.cc',
310 'cronet/android/test/network_change_notifier_util.h',
314 'cronet_tests_jni_headers',
315 '../base/base.gyp:base',
316 '../net/net.gyp:net',
317 '../net/net.gyp:net_quic_proto',
318 '../net/net.gyp:net_test_support',
319 '../net/net.gyp:simple_quic_tools',
320 '../url/url.gyp:url_lib',
321 '../base/base.gyp:base_i18n',
322 '../third_party/icu/icu.gyp:icui18n',
323 '../third_party/icu/icu.gyp:icuuc',
326 ['enable_data_reduction_proxy_support==1',
329 'DATA_REDUCTION_PROXY_SUPPORT'
336 'target_name': 'cronet_test_apk',
340 '../net/net.gyp:net_java_test_support',
343 'apk_name': 'CronetTest',
344 'java_in_dir': 'cronet/android/test',
345 'resource_dir': 'cronet/android/test/res',
346 'asset_location': 'cronet/android/test/assets',
347 'native_lib_target': 'libcronet_tests',
349 'includes': [ '../build/java_apk.gypi' ],
352 # cronet_test_apk creates a .jar as a side effect. Any java targets
353 # that need that .jar in their classpath should depend on this target,
354 # cronet_test_apk_java. Dependents of cronet_test_apk receive its
355 # jar path in the variable 'apk_output_jar_path'. This target should
356 # only be used by targets which instrument cronet_test_apk.
357 'target_name': 'cronet_test_apk_java',
362 'includes': [ '../build/apk_fake_jar.gypi' ],
365 'target_name': 'cronet_test_instrumentation_apk',
368 'cronet_test_apk_java',
369 '../base/base.gyp:base_java_test_support',
372 'apk_name': 'CronetTestInstrumentation',
373 'java_in_dir': 'cronet/android/test/javatests',
374 'resource_dir': 'cronet/android/test/res',
377 'includes': [ '../build/java_apk.gypi' ],
380 'target_name': 'cronet_perf_test_apk',
387 'apk_name': 'CronetPerfTest',
388 'java_in_dir': 'cronet/android/test/javaperftests',
390 'native_lib_target': 'libcronet',
391 'proguard_enabled': 'true',
392 'proguard_flags_paths': [
393 'cronet/android/proguard.cfg',
396 'includes': [ '../build/java_apk.gypi' ],
399 'target_name': 'cronet_package',
405 '../net/net.gyp:net_unittests_apk',
408 'native_lib': 'libcronet.>(android_product_extension)',
409 'java_lib': 'cronet.jar',
410 'java_api_lib': 'cronet_api.jar',
411 'java_src_lib': 'cronet-src.jar',
412 'java_sample_src_lib': 'cronet-sample-src.jar',
413 'lib_java_dir': '<(PRODUCT_DIR)/lib.java',
414 'package_dir': '<(PRODUCT_DIR)/cronet',
415 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/cronet',
416 'jar_extract_dir': '<(intermediate_dir)/cronet_jar_extract',
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)/cronet_java.jar',
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 '--stamp=<(cronet_jar_stamp)',
471 'action_name': 'jar_src_<(_target_name)',
472 'inputs': ['cronet/tools/jar_src.py'] ,
473 'outputs': ['<(package_dir)/<(java_src_lib)'],
477 '--src-dir=cronet/android/java/src',
478 '--jar-path=<(package_dir)/<(java_src_lib)',
482 'action_name': 'jar_sample_src_<(_target_name)',
483 'inputs': ['cronet/tools/jar_src.py'] ,
484 'outputs': ['<(package_dir)/<(java_sample_src_lib)'],
488 '--src-dir=cronet/android/sample',
489 '--jar-path=<(package_dir)/<(java_sample_src_lib)',
493 'action_name': 'generate licenses',
494 'inputs': ['cronet/tools/cronet_licenses.py'] ,
495 'outputs': ['<(package_dir)/LICENSE'],
506 'destination': '<(package_dir)',
510 'cronet/android/proguard.cfg',
511 '<(lib_java_dir)/<(java_api_lib)'
515 'destination': '<(package_dir)/symbols/<(android_app_abi)',
517 '<(SHARED_LIB_DIR)/<(native_lib)',
524 'enable_data_reduction_proxy_support%': 0,