| OLD | NEW |
| 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 26 matching lines...) Expand all Loading... |
| 37 # target's dependencies. The .java files in these directories are not | 37 # target's dependencies. The .java files in these directories are not |
| 38 # included in the 'inputs' list (unlike additional_src_dirs). | 38 # included in the 'inputs' list (unlike additional_src_dirs). |
| 39 # input_jars_paths - The path to jars to be included in the classpath. This | 39 # input_jars_paths - The path to jars to be included in the classpath. This |
| 40 # should be filled automatically by depending on the appropriate targets. | 40 # should be filled automatically by depending on the appropriate targets. |
| 41 # is_test_apk - Set to 1 if building a test apk. This prevents resources from | 41 # is_test_apk - Set to 1 if building a test apk. This prevents resources from |
| 42 # dependencies from being re-included. | 42 # dependencies from being re-included. |
| 43 # native_lib_target - The target_name of the target which generates the final | 43 # native_lib_target - The target_name of the target which generates the final |
| 44 # shared library to be included in this apk. A stripped copy of the | 44 # shared library to be included in this apk. A stripped copy of the |
| 45 # library will be included in the apk. | 45 # library will be included in the apk. |
| 46 # resource_dir - The directory for resources. | 46 # resource_dir - The directory for resources. |
| 47 # shared_resources - Make a resource package that can be loaded by a different |
| 48 # application at runtime to access the package's resources. |
| 47 # R_package - A custom Java package to generate the resource file R.java in. | 49 # R_package - A custom Java package to generate the resource file R.java in. |
| 48 # By default, the package given in AndroidManifest.xml will be used. | 50 # By default, the package given in AndroidManifest.xml will be used. |
| 49 # use_chromium_linker - Enable the content dynamic linker that allows sharing t
he | 51 # use_chromium_linker - Enable the content dynamic linker that allows sharing t
he |
| 50 # RELRO section of the native libraries between the different processes. | 52 # RELRO section of the native libraries between the different processes. |
| 51 # load_library_from_zip_file - When using the dynamic linker, load the library | 53 # load_library_from_zip_file - When using the dynamic linker, load the library |
| 52 # directly out of the zip file. | 54 # directly out of the zip file. |
| 53 # use_relocation_packer - Enable relocation packing. Relies on the chromium | 55 # use_relocation_packer - Enable relocation packing. Relies on the chromium |
| 54 # linker, so use_chromium_linker must also be enabled. | 56 # linker, so use_chromium_linker must also be enabled. |
| 55 # enable_chromium_linker_tests - Enable the content dynamic linker test support | 57 # enable_chromium_linker_tests - Enable the content dynamic linker test support |
| 56 # code. This allows a test APK to inject a Linker.TestRunner instance at | 58 # code. This allows a test APK to inject a Linker.TestRunner instance at |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 'test_jar_path': '<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar', | 121 'test_jar_path': '<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar', |
| 120 'dex_path': '<(intermediate_dir)/classes.dex', | 122 'dex_path': '<(intermediate_dir)/classes.dex', |
| 121 'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar', | 123 'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar', |
| 122 'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml', | 124 'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml', |
| 123 'push_stamp': '<(intermediate_dir)/push.stamp', | 125 'push_stamp': '<(intermediate_dir)/push.stamp', |
| 124 'link_stamp': '<(intermediate_dir)/link.stamp', | 126 'link_stamp': '<(intermediate_dir)/link.stamp', |
| 125 'package_resources_stamp': '<(intermediate_dir)/package_resources.stamp', | 127 'package_resources_stamp': '<(intermediate_dir)/package_resources.stamp', |
| 126 'resource_zip_path': '<(intermediate_dir)/<(_target_name).resources.zip', | 128 'resource_zip_path': '<(intermediate_dir)/<(_target_name).resources.zip', |
| 127 'resource_packaged_apk_name': '<(apk_name)-resources.ap_', | 129 'resource_packaged_apk_name': '<(apk_name)-resources.ap_', |
| 128 'resource_packaged_apk_path': '<(intermediate_dir)/<(resource_packaged_apk_n
ame)', | 130 'resource_packaged_apk_path': '<(intermediate_dir)/<(resource_packaged_apk_n
ame)', |
| 131 'shared_resources%': 0, |
| 129 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', | 132 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', |
| 130 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', | 133 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', |
| 131 'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk', | 134 'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk', |
| 132 'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', | 135 'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', |
| 133 'device_intermediate_dir': '/data/data/org.chromium.gyp_managed_install/<(_t
arget_name)/<(CONFIGURATION_NAME)', | 136 'device_intermediate_dir': '/data/data/org.chromium.gyp_managed_install/<(_t
arget_name)/<(CONFIGURATION_NAME)', |
| 134 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', | 137 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', |
| 135 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh
', | 138 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh
', |
| 136 'create_standalone_apk%': 1, | 139 'create_standalone_apk%': 1, |
| 137 'res_v14_verify_only%': 0, | 140 'res_v14_verify_only%': 0, |
| 138 'variables': { | 141 'variables': { |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 # Write the inputs list to a file, so that its mtime is updated when | 571 # Write the inputs list to a file, so that its mtime is updated when |
| 569 # the list of inputs changes. | 572 # the list of inputs changes. |
| 570 'inputs_list_file': '>|(apk_codegen.<(_target_name).gypcmd >@(additional
_input_paths) >@(resource_input_paths))', | 573 'inputs_list_file': '>|(apk_codegen.<(_target_name).gypcmd >@(additional
_input_paths) >@(resource_input_paths))', |
| 571 'process_resources_options': [], | 574 'process_resources_options': [], |
| 572 'conditions': [ | 575 'conditions': [ |
| 573 ['is_test_apk == 1', { | 576 ['is_test_apk == 1', { |
| 574 'dependencies_res_zip_paths=': [], | 577 'dependencies_res_zip_paths=': [], |
| 575 'additional_res_packages=': [], | 578 'additional_res_packages=': [], |
| 576 }], | 579 }], |
| 577 ['res_v14_verify_only == 1', { | 580 ['res_v14_verify_only == 1', { |
| 578 'process_resources_options': ['--v14-verify-only'] | 581 'process_resources_options+': ['--v14-verify-only'] |
| 582 }], |
| 583 ['shared_resources == 1', { |
| 584 'process_resources_options+': ['--shared-resources'] |
| 579 }], | 585 }], |
| 580 ], | 586 ], |
| 581 }, | 587 }, |
| 582 'inputs': [ | 588 'inputs': [ |
| 583 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 589 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 584 '<(DEPTH)/build/android/gyp/process_resources.py', | 590 '<(DEPTH)/build/android/gyp/process_resources.py', |
| 585 '<(android_manifest_path)', | 591 '<(android_manifest_path)', |
| 586 '>@(additional_input_paths)', | 592 '>@(additional_input_paths)', |
| 587 '>@(resource_input_paths)', | 593 '>@(resource_input_paths)', |
| 588 '>@(dependencies_res_zip_paths)', | 594 '>@(dependencies_res_zip_paths)', |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 '-DEMMA_INSTRUMENT=<(emma_instrument)', | 919 '-DEMMA_INSTRUMENT=<(emma_instrument)', |
| 914 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', | 920 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', |
| 915 | 921 |
| 916 '-Dbasedir=.', | 922 '-Dbasedir=.', |
| 917 '-buildfile', | 923 '-buildfile', |
| 918 '<(DEPTH)/build/android/ant/apk-package.xml', | 924 '<(DEPTH)/build/android/ant/apk-package.xml', |
| 919 ] | 925 ] |
| 920 }, | 926 }, |
| 921 ], | 927 ], |
| 922 } | 928 } |
| OLD | NEW |