Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: build/java_apk.gypi

Issue 334413006: Add support for uncompress library in APK to the build system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # This file is meant to be included into a target to provide a rule 5 # This file is meant to be included into a target to provide a rule
6 # to build Android APKs in a consistent manner. 6 # to build Android APKs in a consistent manner.
7 # 7 #
8 # To use this, create a gyp target with the following form: 8 # To use this, create a gyp target with the following form:
9 # { 9 # {
10 # 'target_name': 'my_package_apk', 10 # 'target_name': 'my_package_apk',
(...skipping 28 matching lines...) Expand all
39 # is_test_apk - Set to 1 if building a test apk. This prevents resources from 39 # is_test_apk - Set to 1 if building a test apk. This prevents resources from
40 # dependencies from being re-included. 40 # dependencies from being re-included.
41 # native_lib_target - The target_name of the target which generates the final 41 # native_lib_target - The target_name of the target which generates the final
42 # shared library to be included in this apk. A stripped copy of the 42 # shared library to be included in this apk. A stripped copy of the
43 # library will be included in the apk. 43 # library will be included in the apk.
44 # resource_dir - The directory for resources. 44 # resource_dir - The directory for resources.
45 # R_package - A custom Java package to generate the resource file R.java in. 45 # R_package - A custom Java package to generate the resource file R.java in.
46 # By default, the package given in AndroidManifest.xml will be used. 46 # By default, the package given in AndroidManifest.xml will be used.
47 # use_chromium_linker - Enable the content dynamic linker that allows sharing t he 47 # use_chromium_linker - Enable the content dynamic linker that allows sharing t he
48 # RELRO section of the native libraries between the different processes. 48 # RELRO section of the native libraries between the different processes.
49 # use_library_in_zip_file - When using the dynamic linker, load the library
rmcilroy 2014/06/19 09:46:12 nit - load_library_from_zip_file
Anton 2014/06/19 13:39:45 Done.
50 # directly out of the zip file.
49 # enable_chromium_linker_tests - Enable the content dynamic linker test support 51 # enable_chromium_linker_tests - Enable the content dynamic linker test support
50 # code. This allows a test APK to inject a Linker.TestRunner instance at 52 # code. This allows a test APK to inject a Linker.TestRunner instance at
51 # runtime. Should only be used by the chromium_linker_test_apk target!! 53 # runtime. Should only be used by the chromium_linker_test_apk target!!
52 # never_lint - Set to 1 to not run lint on this target. 54 # never_lint - Set to 1 to not run lint on this target.
53 { 55 {
54 'variables': { 56 'variables': {
55 'tested_apk_obfuscated_jar_path%': '/', 57 'tested_apk_obfuscated_jar_path%': '/',
56 'tested_apk_dex_path%': '/', 58 'tested_apk_dex_path%': '/',
57 'additional_input_paths': [], 59 'additional_input_paths': [],
58 'input_jars_paths': [], 60 'input_jars_paths': [],
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 'device_intermediate_dir': '/data/data/org.chromium.gyp_managed_install/<(_t arget_name)/<(CONFIGURATION_NAME)', 119 'device_intermediate_dir': '/data/data/org.chromium.gyp_managed_install/<(_t arget_name)/<(CONFIGURATION_NAME)',
118 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', 120 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh',
119 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh ', 121 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh ',
120 'create_standalone_apk%': 1, 122 'create_standalone_apk%': 1,
121 'res_v14_verify_only%': 0, 123 'res_v14_verify_only%': 0,
122 'variables': { 124 'variables': {
123 'variables': { 125 'variables': {
124 'native_lib_target%': '', 126 'native_lib_target%': '',
125 'native_lib_version_name%': '', 127 'native_lib_version_name%': '',
126 'use_chromium_linker%' : 0, 128 'use_chromium_linker%' : 0,
129 'use_library_in_zip_file%' : 0,
127 'enable_chromium_linker_tests%': 0, 130 'enable_chromium_linker_tests%': 0,
128 'is_test_apk%': 0, 131 'is_test_apk%': 0,
129 }, 132 },
130 'conditions': [ 133 'conditions': [
131 ['gyp_managed_install == 1 and native_lib_target != ""', { 134 ['gyp_managed_install == 1 and native_lib_target != ""', {
132 'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-stand alone-unsigned.apk', 135 'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-stand alone-unsigned.apk',
133 }, { 136 }, {
134 'unsigned_standalone_apk_path': '<(unsigned_apk_path)', 137 'unsigned_standalone_apk_path': '<(unsigned_apk_path)',
135 }], 138 }],
136 ['gyp_managed_install == 1', { 139 ['gyp_managed_install == 1', {
137 'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed', 140 'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed',
138 }, { 141 }, {
139 'apk_package_native_libs_dir': '<(intermediate_dir)/libs', 142 'apk_package_native_libs_dir': '<(intermediate_dir)/libs',
140 }], 143 }],
141 ['is_test_apk == 0 and emma_coverage != 0', { 144 ['is_test_apk == 0 and emma_coverage != 0', {
142 'emma_instrument%': 1, 145 'emma_instrument%': 1,
143 },{ 146 },{
144 'emma_instrument%': 0, 147 'emma_instrument%': 0,
145 }], 148 }],
146 ], 149 ],
147 }, 150 },
148 'native_lib_target%': '', 151 'native_lib_target%': '',
149 'native_lib_version_name%': '', 152 'native_lib_version_name%': '',
150 'use_chromium_linker%' : 0, 153 'use_chromium_linker%' : 0,
151 'enable_chromium_linker_tests%': 0, 154 'enable_chromium_linker_tests%': 0,
155 'use_library_in_zip_file%' : 0,
152 'emma_instrument%': '<(emma_instrument)', 156 'emma_instrument%': '<(emma_instrument)',
153 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', 157 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)',
154 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', 158 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)',
155 'extra_native_libs': [], 159 'extra_native_libs': [],
156 'apk_dex_input_paths': [ '>@(library_dexed_jars_paths)' ], 160 'apk_dex_input_paths': [ '>@(library_dexed_jars_paths)' ],
157 }, 161 },
158 # Pass the jar path to the apk's "fake" jar target. This would be better as 162 # Pass the jar path to the apk's "fake" jar target. This would be better as
159 # direct_dependent_settings, but a variable set by a direct_dependent_settings 163 # direct_dependent_settings, but a variable set by a direct_dependent_settings
160 # cannot be lifted in a dependent to all_dependent_settings. 164 # cannot be lifted in a dependent to all_dependent_settings.
161 'all_dependent_settings': { 165 'all_dependent_settings': {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 '--ordered-libraries=<(ordered_libraries_file)', 262 '--ordered-libraries=<(ordered_libraries_file)',
259 '--version-name=<(native_lib_version_name)', 263 '--version-name=<(native_lib_version_name)',
260 '--native-library-list=<(native_libraries_template_data_file)', 264 '--native-library-list=<(native_libraries_template_data_file)',
261 '--version-output=<(native_libraries_template_version_file)', 265 '--version-output=<(native_libraries_template_version_file)',
262 ], 266 ],
263 }, 267 },
264 { 268 {
265 'action_name': 'native_libraries_<(_target_name)', 269 'action_name': 'native_libraries_<(_target_name)',
266 'variables': { 270 'variables': {
267 'conditions': [ 271 'conditions': [
272 ['use_chromium_linker == 1 and use_library_in_zip_file == 1', {
273 'variables': {
274 'linker_gcc_preprocess_defines': [
275 '--defines', 'ENABLE_CHROMIUM_LINKER_LIBRARY_IN_ZIP_FILE',
rmcilroy 2014/06/19 09:46:12 Does this work? I would have though the linker_gc
Anton 2014/06/19 13:39:45 What you are suggesting does not work. The tool do
276 ],
277 }
278 }, {
279 'variables': {
280 'linker_gcc_preprocess_defines': [],
281 },
282 }],
268 ['use_chromium_linker == 1', { 283 ['use_chromium_linker == 1', {
269 'variables': { 284 'variables': {
270 'linker_gcc_preprocess_defines': [ 285 'linker_gcc_preprocess_defines': [
271 '--defines', 'ENABLE_CHROMIUM_LINKER', 286 '--defines', 'ENABLE_CHROMIUM_LINKER',
272 ], 287 ],
273 } 288 }
274 }, { 289 }, {
275 'variables': { 290 'variables': {
276 'linker_gcc_preprocess_defines': [], 291 'linker_gcc_preprocess_defines': [],
277 }, 292 },
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 'actions': [ 415 'actions': [
401 { 416 {
402 'action_name': 'finalize standalone apk', 417 'action_name': 'finalize standalone apk',
403 'variables': { 418 'variables': {
404 'input_apk_path': '<(unsigned_standalone_apk_path)', 419 'input_apk_path': '<(unsigned_standalone_apk_path)',
405 'output_apk_path': '<(final_apk_path)', 420 'output_apk_path': '<(final_apk_path)',
406 }, 421 },
407 'includes': [ 'android/finalize_apk_action.gypi'] 422 'includes': [ 'android/finalize_apk_action.gypi']
408 }, 423 },
409 ], 424 ],
425 'dependencies': [
426 '<(DEPTH)/build/android/rezip.gyp:rezip#host',
427 ],
410 }], 428 }],
411 ['gyp_managed_install == 1', { 429 ['gyp_managed_install == 1', {
412 'actions': [ 430 'actions': [
413 { 431 {
414 'action_name': 'finalize incomplete apk', 432 'action_name': 'finalize incomplete apk',
415 'variables': { 433 'variables': {
416 'input_apk_path': '<(unsigned_apk_path)', 434 'input_apk_path': '<(unsigned_apk_path)',
417 'output_apk_path': '<(incomplete_apk_path)', 435 'output_apk_path': '<(incomplete_apk_path)',
418 }, 436 },
419 'includes': [ 'android/finalize_apk_action.gypi'] 437 'includes': [ 'android/finalize_apk_action.gypi']
(...skipping 12 matching lines...) Expand all
432 ], 450 ],
433 'action': [ 451 'action': [
434 'python', '<(DEPTH)/build/android/gyp/apk_install.py', 452 'python', '<(DEPTH)/build/android/gyp/apk_install.py',
435 '--apk-path=<(incomplete_apk_path)', 453 '--apk-path=<(incomplete_apk_path)',
436 '--build-device-configuration=<(build_device_config_path)', 454 '--build-device-configuration=<(build_device_config_path)',
437 '--install-record=<(apk_install_record)', 455 '--install-record=<(apk_install_record)',
438 '--configuration-name=<(CONFIGURATION_NAME)', 456 '--configuration-name=<(CONFIGURATION_NAME)',
439 ], 457 ],
440 }, 458 },
441 ], 459 ],
460 'dependencies': [
461 '<(DEPTH)/build/android/rezip.gyp:rezip#host',
462 ],
442 }], 463 }],
443 ['is_test_apk == 1', { 464 ['is_test_apk == 1', {
444 'dependencies': [ 465 'dependencies': [
445 '<(DEPTH)/tools/android/android_tools.gyp:android_tools', 466 '<(DEPTH)/tools/android/android_tools.gyp:android_tools',
446 ] 467 ]
447 }], 468 }],
448 ], 469 ],
449 'dependencies': [ 470 'dependencies': [
450 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', 471 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum',
451 ], 472 ],
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 '-DEMMA_INSTRUMENT=<(emma_instrument)', 832 '-DEMMA_INSTRUMENT=<(emma_instrument)',
812 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', 833 '-DEMMA_DEVICE_JAR=<(emma_device_jar)',
813 834
814 '-Dbasedir=.', 835 '-Dbasedir=.',
815 '-buildfile', 836 '-buildfile',
816 '<(DEPTH)/build/android/ant/apk-package.xml', 837 '<(DEPTH)/build/android/ant/apk-package.xml',
817 ] 838 ]
818 }, 839 },
819 ], 840 ],
820 } 841 }
OLDNEW
« build/android/gyp/finalize_apk.py ('K') | « build/android/gyp/finalize_apk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698