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

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: Update for Ross' review Created 6 years, 5 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
« no previous file with comments | « build/android/gyp/finalize_apk.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 # load_library_from_zip_file - When using the dynamic linker, load the library
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 'load_library_from_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 'load_library_from_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 }, 160 },
157 # Pass the jar path to the apk's "fake" jar target. This would be better as 161 # Pass the jar path to the apk's "fake" jar target. This would be better as
158 # direct_dependent_settings, but a variable set by a direct_dependent_settings 162 # direct_dependent_settings, but a variable set by a direct_dependent_settings
159 # cannot be lifted in a dependent to all_dependent_settings. 163 # cannot be lifted in a dependent to all_dependent_settings.
160 'all_dependent_settings': { 164 'all_dependent_settings': {
161 'conditions': [ 165 'conditions': [
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 'variables': { 272 'variables': {
269 'linker_gcc_preprocess_defines': [ 273 'linker_gcc_preprocess_defines': [
270 '--defines', 'ENABLE_CHROMIUM_LINKER', 274 '--defines', 'ENABLE_CHROMIUM_LINKER',
271 ], 275 ],
272 } 276 }
273 }, { 277 }, {
274 'variables': { 278 'variables': {
275 'linker_gcc_preprocess_defines': [], 279 'linker_gcc_preprocess_defines': [],
276 }, 280 },
277 }], 281 }],
282 ['load_library_from_zip_file == 1', {
283 'variables': {
284 'linker_load_from_zip_file_preprocess_defines': [
285 '--defines', 'ENABLE_CHROMIUM_LINKER_LIBRARY_IN_ZIP_FILE',
286 ],
287 }
288 }, {
289 'variables': {
290 'linker_load_from_zip_file_preprocess_defines': [],
291 },
292 }],
278 ['enable_chromium_linker_tests == 1', { 293 ['enable_chromium_linker_tests == 1', {
279 'variables': { 294 'variables': {
280 'linker_tests_gcc_preprocess_defines': [ 295 'linker_tests_gcc_preprocess_defines': [
281 '--defines', 'ENABLE_CHROMIUM_LINKER_TESTS', 296 '--defines', 'ENABLE_CHROMIUM_LINKER_TESTS',
282 ], 297 ],
283 } 298 }
284 }, { 299 }, {
285 'variables': { 300 'variables': {
286 'linker_tests_gcc_preprocess_defines': [], 301 'linker_tests_gcc_preprocess_defines': [],
287 }, 302 },
288 }], 303 }],
289 ], 304 ],
290 'gcc_preprocess_defines': [ 305 'gcc_preprocess_defines': [
306 '<@(linker_load_from_zip_file_preprocess_defines)',
291 '<@(linker_gcc_preprocess_defines)', 307 '<@(linker_gcc_preprocess_defines)',
292 '<@(linker_tests_gcc_preprocess_defines)', 308 '<@(linker_tests_gcc_preprocess_defines)',
293 ], 309 ],
294 }, 310 },
295 'message': 'Creating NativeLibraries.java for <(_target_name)', 311 'message': 'Creating NativeLibraries.java for <(_target_name)',
296 'inputs': [ 312 'inputs': [
297 '<(DEPTH)/build/android/gyp/util/build_utils.py', 313 '<(DEPTH)/build/android/gyp/util/build_utils.py',
298 '<(DEPTH)/build/android/gyp/gcc_preprocess.py', 314 '<(DEPTH)/build/android/gyp/gcc_preprocess.py',
299 '<(native_libraries_template_data_file)', 315 '<(native_libraries_template_data_file)',
300 '<(native_libraries_template_version_file)', 316 '<(native_libraries_template_version_file)',
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 'actions': [ 415 'actions': [
400 { 416 {
401 'action_name': 'finalize standalone apk', 417 'action_name': 'finalize standalone apk',
402 'variables': { 418 'variables': {
403 'input_apk_path': '<(unsigned_standalone_apk_path)', 419 'input_apk_path': '<(unsigned_standalone_apk_path)',
404 'output_apk_path': '<(final_apk_path)', 420 'output_apk_path': '<(final_apk_path)',
405 }, 421 },
406 'includes': [ 'android/finalize_apk_action.gypi'] 422 'includes': [ 'android/finalize_apk_action.gypi']
407 }, 423 },
408 ], 424 ],
425 'dependencies': [
426 '<(DEPTH)/build/android/rezip.gyp:rezip#host',
427 ],
409 }], 428 }],
410 ['gyp_managed_install == 1', { 429 ['gyp_managed_install == 1', {
411 'actions': [ 430 'actions': [
412 { 431 {
413 'action_name': 'finalize incomplete apk', 432 'action_name': 'finalize incomplete apk',
414 'variables': { 433 'variables': {
415 'input_apk_path': '<(unsigned_apk_path)', 434 'input_apk_path': '<(unsigned_apk_path)',
416 'output_apk_path': '<(incomplete_apk_path)', 435 'output_apk_path': '<(incomplete_apk_path)',
417 }, 436 },
418 'includes': [ 'android/finalize_apk_action.gypi'] 437 'includes': [ 'android/finalize_apk_action.gypi']
(...skipping 12 matching lines...) Expand all
431 ], 450 ],
432 'action': [ 451 'action': [
433 'python', '<(DEPTH)/build/android/gyp/apk_install.py', 452 'python', '<(DEPTH)/build/android/gyp/apk_install.py',
434 '--apk-path=<(incomplete_apk_path)', 453 '--apk-path=<(incomplete_apk_path)',
435 '--build-device-configuration=<(build_device_config_path)', 454 '--build-device-configuration=<(build_device_config_path)',
436 '--install-record=<(apk_install_record)', 455 '--install-record=<(apk_install_record)',
437 '--configuration-name=<(CONFIGURATION_NAME)', 456 '--configuration-name=<(CONFIGURATION_NAME)',
438 ], 457 ],
439 }, 458 },
440 ], 459 ],
460 'dependencies': [
461 '<(DEPTH)/build/android/rezip.gyp:rezip#host',
462 ],
441 }], 463 }],
442 ['is_test_apk == 1', { 464 ['is_test_apk == 1', {
443 'dependencies': [ 465 'dependencies': [
444 '<(DEPTH)/tools/android/android_tools.gyp:android_tools', 466 '<(DEPTH)/tools/android/android_tools.gyp:android_tools',
445 ] 467 ]
446 }], 468 }],
447 ], 469 ],
448 'dependencies': [ 470 'dependencies': [
449 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', 471 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum',
450 ], 472 ],
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 '-DEMMA_INSTRUMENT=<(emma_instrument)', 815 '-DEMMA_INSTRUMENT=<(emma_instrument)',
794 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', 816 '-DEMMA_DEVICE_JAR=<(emma_device_jar)',
795 817
796 '-Dbasedir=.', 818 '-Dbasedir=.',
797 '-buildfile', 819 '-buildfile',
798 '<(DEPTH)/build/android/ant/apk-package.xml', 820 '<(DEPTH)/build/android/ant/apk-package.xml',
799 ] 821 ]
800 }, 822 },
801 ], 823 ],
802 } 824 }
OLDNEW
« no previous file with comments | « build/android/gyp/finalize_apk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698