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' ],
116 # cronet_static target depends on ICU and includes file and ftp support.
117 'target_name': 'cronet_static',
119 '../base/base.gyp:base_i18n',
120 '../net/net.gyp:net',
122 'includes': [ 'cronet/cronet_static.gypi' ],
125 'target_name': 'libcronet',
126 'type': 'shared_library',
128 'cronet/android/cronet_jni.cc',
131 'cronet_static_small',
132 '../base/base.gyp:base',
133 '../net/net.gyp:net_small',
134 '../url/url.gyp:url_lib_use_icu_alternatives_on_android',
137 { # cronet_stub.jar defines HttpUrlRequest interface and provides its
138 # its implementation using HttpUrlConnection (not the Chromium stack).
139 'target_name': 'cronet_stub',
142 'cronet_url_request_context_config_list',
146 'java_in_dir': 'cronet/android/java',
148 '**/ChunkedWritableByteChannel.java',
149 '**/ExtendedResponseInfo.java',
150 '**/HistogramManager.java',
151 '**/HttpUrlConnection*.java',
152 '**/HttpUrlRequest*.java',
153 '**/ResponseInfo.java',
154 '**/ResponseTooLargeException.java',
155 '**/UploadDataProvider.java',
156 '**/UploadDataSink.java',
157 '**/UrlRequest.java',
158 '**/UrlRequestContext.java',
159 '**/UrlRequestContextConfig.java',
160 '**/UrlRequestContextConfigList.java',
161 '**/UrlRequestException.java',
162 '**/UrlRequestListener.java',
167 'includes': [ '../build/java.gypi' ],
169 { # cronet.jar implements HttpUrlRequest interface using Chromium stack
170 # in native libcronet.so library.
171 'target_name': 'cronet_java',
174 '../base/base.gyp:base',
176 'cronet_url_request_java',
178 'net_request_priority_java',
181 'java_in_dir': 'cronet/android/java',
183 '**/ChromiumAsyncUrlRequest.java',
184 '**/ChromiumUrlRequest.java',
185 '**/ChromiumUrlRequestContext.java',
186 '**/ChromiumUrlRequestError.java',
187 '**/ChromiumUrlRequestFactory.java',
188 '**/ChromiumUrlRequestPriority.java',
189 '**/CronetHistogramManager.java',
190 '**/CronetResponseInfo.java',
191 '**/CronetLibraryLoader.java',
192 '**/CronetUploadDataStream.java',
193 '**/CronetUrlRequest.java',
194 '**/CronetUrlRequestContext.java',
195 '**/CronetUrlRequestFactory.java',
196 '**/RequestPriority.java',
197 '**/urlconnection/CronetInputStream.java',
198 '**/urlconnection/CronetHttpURLConnection.java',
199 '**/urlconnection/CronetHttpURLStreamHandler.java',
200 '**/urlconnection/CronetURLStreamHandlerFactory.java',
201 '**/urlconnection/MessageLoop.java',
204 'includes': [ '../build/java.gypi' ],
207 'target_name': 'cronet_sample_apk',
214 'apk_name': 'CronetSample',
215 'java_in_dir': 'cronet/android/sample',
216 'resource_dir': 'cronet/android/sample/res',
217 'native_lib_target': 'libcronet',
218 'proguard_enabled': 'true',
219 'proguard_flags_paths': [
220 'cronet/android/proguard.cfg',
221 'cronet/android/sample/javatests/proguard.cfg',
224 'includes': [ '../build/java_apk.gypi' ],
227 # cronet_sample_apk creates a .jar as a side effect. Any java targets
228 # that need that .jar in their classpath should depend on this target,
229 # cronet_sample_apk_java. Dependents of cronet_sample_apk receive its
230 # jar path in the variable 'apk_output_jar_path'. This target should
231 # only be used by targets which instrument cronet_sample_apk.
232 'target_name': 'cronet_sample_apk_java',
237 'includes': [ '../build/apk_fake_jar.gypi' ],
240 'target_name': 'cronet_sample_test_apk',
244 'cronet_sample_apk_java',
246 '../base/base.gyp:base_java_test_support',
249 'apk_name': 'CronetSampleTest',
250 'java_in_dir': 'cronet/android/sample/javatests',
251 'resource_dir': 'cronet/android/sample/res',
254 'includes': [ '../build/java_apk.gypi' ],
257 'target_name': 'cronet_tests_jni_headers',
260 'cronet/android/test/src/org/chromium/net/CronetTestUtil.java',
261 'cronet/android/test/src/org/chromium/net/MockUrlRequestJobFactory.java',
262 'cronet/android/test/src/org/chromium/net/NativeTestServer.java',
263 'cronet/android/test/src/org/chromium/net/NetworkChangeNotifierUtil.java',
264 'cronet/android/test/src/org/chromium/net/QuicTestServer.java',
265 'cronet/android/test/src/org/chromium/net/TestUploadDataStreamHandler.java',
268 'jni_gen_package': 'cronet_tests',
270 'includes': [ '../build/jni_generator.gypi' ],
273 'target_name': 'libcronet_tests',
274 'type': 'shared_library',
276 'cronet/android/test/cronet_test_jni.cc',
277 'cronet/android/test/mock_url_request_job_factory.cc',
278 'cronet/android/test/mock_url_request_job_factory.h',
279 'cronet/android/test/native_test_server.cc',
280 'cronet/android/test/native_test_server.h',
281 'cronet/android/test/quic_test_server.cc',
282 'cronet/android/test/quic_test_server.h',
283 'cronet/android/test/test_upload_data_stream_handler.cc',
284 'cronet/android/test/test_upload_data_stream_handler.h',
285 'cronet/android/test/network_change_notifier_util.cc',
286 'cronet/android/test/network_change_notifier_util.h',
290 'cronet_tests_jni_headers',
291 '../base/base.gyp:base',
292 '../net/net.gyp:net',
293 '../net/net.gyp:net_quic_proto',
294 '../net/net.gyp:net_test_support',
295 '../net/net.gyp:simple_quic_tools',
296 '../url/url.gyp:url_lib',
297 '../base/base.gyp:base_i18n',
298 '../third_party/icu/icu.gyp:icui18n',
299 '../third_party/icu/icu.gyp:icuuc',
302 ['use_icu_alternatives_on_android==1',
305 '../net/base/directory_lister.cc',
306 '../net/base/directory_lister.h',
307 '../net/url_request/url_request_file_job.cc',
308 '../net/url_request/url_request_file_job.h',
315 'target_name': 'cronet_test_apk',
321 'apk_name': 'CronetTest',
322 'java_in_dir': 'cronet/android/test',
323 'resource_dir': 'cronet/android/test/res',
324 'asset_location': 'cronet/android/test/assets',
325 'native_lib_target': 'libcronet_tests',
327 'includes': [ '../build/java_apk.gypi' ],
330 # cronet_test_apk creates a .jar as a side effect. Any java targets
331 # that need that .jar in their classpath should depend on this target,
332 # cronet_test_apk_java. Dependents of cronet_test_apk receive its
333 # jar path in the variable 'apk_output_jar_path'. This target should
334 # only be used by targets which instrument cronet_test_apk.
335 'target_name': 'cronet_test_apk_java',
340 'includes': [ '../build/apk_fake_jar.gypi' ],
343 'target_name': 'cronet_test_instrumentation_apk',
346 'cronet_test_apk_java',
347 '../base/base.gyp:base_java_test_support',
350 'apk_name': 'CronetTestInstrumentation',
351 'java_in_dir': 'cronet/android/test/javatests',
352 'resource_dir': 'cronet/android/test/res',
355 'includes': [ '../build/java_apk.gypi' ],
358 'target_name': 'cronet_package',
366 'native_lib': 'libcronet.>(android_product_extension)',
367 'java_lib': 'cronet.jar',
368 'java_stub_lib': 'cronet_stub.jar',
369 'java_src_lib': 'cronet-src.jar',
370 'java_sample_src_lib': 'cronet-sample-src.jar',
371 'lib_java_dir': '<(PRODUCT_DIR)/lib.java',
372 'package_dir': '<(PRODUCT_DIR)/cronet',
373 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/cronet',
374 'jar_extract_dir': '<(intermediate_dir)/cronet_jar_extract',
375 'jar_extract_stamp': '<(intermediate_dir)/jar_extract.stamp',
376 'cronet_jar_stamp': '<(intermediate_dir)/cronet_jar.stamp',
380 'action_name': 'strip libcronet',
381 'inputs': ['<(SHARED_LIB_DIR)/<(native_lib)'],
382 'outputs': ['<(package_dir)/libs/<(android_app_abi)/<(native_lib)'],
392 'action_name': 'extracting from jars',
394 '<(lib_java_dir)/cronet_java.jar',
395 '<(lib_java_dir)/base_java.jar',
396 '<(lib_java_dir)/net_java.jar',
397 '<(lib_java_dir)/url_java.jar',
399 'outputs': ['<(jar_extract_stamp)', '<(jar_extract_dir)'],
402 'cronet/tools/extract_from_jars.py',
403 '--classes-dir=<(jar_extract_dir)',
404 '--jars=<@(_inputs)',
405 '--stamp=<(jar_extract_stamp)',
409 'action_name': 'jar_<(_target_name)',
410 'message': 'Creating <(_target_name) jar',
412 '<(DEPTH)/build/android/gyp/util/build_utils.py',
413 '<(DEPTH)/build/android/gyp/util/md5_check.py',
414 '<(DEPTH)/build/android/gyp/jar.py',
415 '<(jar_extract_stamp)',
418 '<(package_dir)/<(java_lib)',
419 '<(cronet_jar_stamp)',
422 'python', '<(DEPTH)/build/android/gyp/jar.py',
423 '--classes-dir=<(jar_extract_dir)',
424 '--jar-path=<(package_dir)/<(java_lib)',
425 '--stamp=<(cronet_jar_stamp)',
429 'action_name': 'jar_src_<(_target_name)',
430 'inputs': ['cronet/tools/jar_src.py'] ,
431 'outputs': ['<(package_dir)/<(java_src_lib)'],
435 '--src-dir=cronet/android/java/src',
436 '--jar-path=<(package_dir)/<(java_src_lib)',
440 'action_name': 'jar_sample_src_<(_target_name)',
441 'inputs': ['cronet/tools/jar_src.py'] ,
442 'outputs': ['<(package_dir)/<(java_sample_src_lib)'],
446 '--src-dir=cronet/android/sample',
447 '--jar-path=<(package_dir)/<(java_sample_src_lib)',
451 'action_name': 'generate licenses',
452 'inputs': ['cronet/tools/cronet_licenses.py'] ,
453 'outputs': ['<(package_dir)/LICENSE'],
464 'destination': '<(package_dir)',
468 'cronet/android/proguard.cfg',
469 '<(lib_java_dir)/<(java_stub_lib)'
473 'destination': '<(package_dir)/symbols/<(android_app_abi)',
475 '<(SHARED_LIB_DIR)/<(native_lib)',