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_stub.jar defines HttpUrlRequest interface and provides its
156 # its implementation using HttpUrlConnection (not the Chromium stack).
157 'target_name': 'cronet_stub',
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/TestUploadDataStreamHandler.java',
289 'jni_gen_package': 'cronet_tests',
291 'includes': [ '../build/jni_generator.gypi' ],
294 'target_name': 'libcronet_tests',
295 'type': 'shared_library',
297 'cronet/android/test/cronet_test_jni.cc',
298 'cronet/android/test/mock_url_request_job_factory.cc',
299 'cronet/android/test/mock_url_request_job_factory.h',
300 'cronet/android/test/native_test_server.cc',
301 'cronet/android/test/native_test_server.h',
302 'cronet/android/test/quic_test_server.cc',
303 'cronet/android/test/quic_test_server.h',
304 'cronet/android/test/test_upload_data_stream_handler.cc',
305 'cronet/android/test/test_upload_data_stream_handler.h',
306 'cronet/android/test/network_change_notifier_util.cc',
307 'cronet/android/test/network_change_notifier_util.h',
311 'cronet_tests_jni_headers',
312 '../base/base.gyp:base',
313 '../net/net.gyp:net',
314 '../net/net.gyp:net_quic_proto',
315 '../net/net.gyp:net_test_support',
316 '../net/net.gyp:simple_quic_tools',
317 '../url/url.gyp:url_lib',
318 '../base/base.gyp:base_i18n',
319 '../third_party/icu/icu.gyp:icui18n',
320 '../third_party/icu/icu.gyp:icuuc',
323 ['enable_data_reduction_proxy_support==1',
326 'DATA_REDUCTION_PROXY_SUPPORT'
333 'target_name': 'cronet_test_apk',
337 '../net/net.gyp:net_java_test_support',
340 'apk_name': 'CronetTest',
341 'java_in_dir': 'cronet/android/test',
342 'resource_dir': 'cronet/android/test/res',
343 'asset_location': 'cronet/android/test/assets',
344 'native_lib_target': 'libcronet_tests',
346 'includes': [ '../build/java_apk.gypi' ],
349 # cronet_test_apk creates a .jar as a side effect. Any java targets
350 # that need that .jar in their classpath should depend on this target,
351 # cronet_test_apk_java. Dependents of cronet_test_apk receive its
352 # jar path in the variable 'apk_output_jar_path'. This target should
353 # only be used by targets which instrument cronet_test_apk.
354 'target_name': 'cronet_test_apk_java',
359 'includes': [ '../build/apk_fake_jar.gypi' ],
362 'target_name': 'cronet_test_instrumentation_apk',
365 'cronet_test_apk_java',
366 '../base/base.gyp:base_java_test_support',
369 'apk_name': 'CronetTestInstrumentation',
370 'java_in_dir': 'cronet/android/test/javatests',
371 'resource_dir': 'cronet/android/test/res',
374 'includes': [ '../build/java_apk.gypi' ],
377 'target_name': 'cronet_package',
383 '../net/net.gyp:net_unittests_apk',
386 'native_lib': 'libcronet.>(android_product_extension)',
387 'java_lib': 'cronet.jar',
388 'java_stub_lib': 'cronet_stub.jar',
389 'java_src_lib': 'cronet-src.jar',
390 'java_sample_src_lib': 'cronet-sample-src.jar',
391 'lib_java_dir': '<(PRODUCT_DIR)/lib.java',
392 'package_dir': '<(PRODUCT_DIR)/cronet',
393 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/cronet',
394 'jar_extract_dir': '<(intermediate_dir)/cronet_jar_extract',
395 'jar_extract_stamp': '<(intermediate_dir)/jar_extract.stamp',
396 'cronet_jar_stamp': '<(intermediate_dir)/cronet_jar.stamp',
400 'action_name': 'strip libcronet',
401 'inputs': ['<(SHARED_LIB_DIR)/<(native_lib)'],
402 'outputs': ['<(package_dir)/libs/<(android_app_abi)/<(native_lib)'],
412 'action_name': 'extracting from jars',
414 '<(lib_java_dir)/cronet_java.jar',
415 '<(lib_java_dir)/base_java.jar',
416 '<(lib_java_dir)/net_java.jar',
417 '<(lib_java_dir)/url_java.jar',
419 'outputs': ['<(jar_extract_stamp)', '<(jar_extract_dir)'],
422 'cronet/tools/extract_from_jars.py',
423 '--classes-dir=<(jar_extract_dir)',
424 '--jars=<@(_inputs)',
425 '--stamp=<(jar_extract_stamp)',
429 'action_name': 'jar_<(_target_name)',
430 'message': 'Creating <(_target_name) jar',
432 '<(DEPTH)/build/android/gyp/util/build_utils.py',
433 '<(DEPTH)/build/android/gyp/util/md5_check.py',
434 '<(DEPTH)/build/android/gyp/jar.py',
435 '<(jar_extract_stamp)',
438 '<(package_dir)/<(java_lib)',
439 '<(cronet_jar_stamp)',
442 'python', '<(DEPTH)/build/android/gyp/jar.py',
443 '--classes-dir=<(jar_extract_dir)',
444 '--jar-path=<(package_dir)/<(java_lib)',
445 '--stamp=<(cronet_jar_stamp)',
449 'action_name': 'jar_src_<(_target_name)',
450 'inputs': ['cronet/tools/jar_src.py'] ,
451 'outputs': ['<(package_dir)/<(java_src_lib)'],
455 '--src-dir=cronet/android/java/src',
456 '--jar-path=<(package_dir)/<(java_src_lib)',
460 'action_name': 'jar_sample_src_<(_target_name)',
461 'inputs': ['cronet/tools/jar_src.py'] ,
462 'outputs': ['<(package_dir)/<(java_sample_src_lib)'],
466 '--src-dir=cronet/android/sample',
467 '--jar-path=<(package_dir)/<(java_sample_src_lib)',
471 'action_name': 'generate licenses',
472 'inputs': ['cronet/tools/cronet_licenses.py'] ,
473 'outputs': ['<(package_dir)/LICENSE'],
484 'destination': '<(package_dir)',
488 'cronet/android/proguard.cfg',
489 '<(lib_java_dir)/<(java_stub_lib)'
493 'destination': '<(package_dir)/symbols/<(android_app_abi)',
495 '<(SHARED_LIB_DIR)/<(native_lib)',
502 'enable_data_reduction_proxy_support%': 0,