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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml', | 100 'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml', |
101 'push_stamp': '<(intermediate_dir)/push.stamp', | 101 'push_stamp': '<(intermediate_dir)/push.stamp', |
102 'link_stamp': '<(intermediate_dir)/link.stamp', | 102 'link_stamp': '<(intermediate_dir)/link.stamp', |
103 'package_resources_stamp': '<(intermediate_dir)/package_resources.stamp', | 103 'package_resources_stamp': '<(intermediate_dir)/package_resources.stamp', |
104 'codegen_input_paths': [], | 104 'codegen_input_paths': [], |
105 'keystore_path': '<(DEPTH)/build/android/ant/chromium-debug.keystore', | 105 'keystore_path': '<(DEPTH)/build/android/ant/chromium-debug.keystore', |
106 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', | 106 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', |
107 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', | 107 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', |
108 'source_dir': '<(java_in_dir)/src', | 108 'source_dir': '<(java_in_dir)/src', |
109 'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', | 109 'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', |
110 'apk_package_native_libs_dir': '<(intermediate_dir)/libs', | |
111 'device_intermediate_dir': '/data/local/tmp/chromium/<(_target_name)/<(CONFI
GURATION_NAME)', | 110 'device_intermediate_dir': '/data/local/tmp/chromium/<(_target_name)/<(CONFI
GURATION_NAME)', |
112 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', | 111 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', |
113 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh
', | 112 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh
', |
| 113 'variables': { |
| 114 'conditions': [ |
| 115 ['gyp_managed_install == 1', { |
| 116 'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed', |
| 117 }, { |
| 118 'apk_package_native_libs_dir': '<(intermediate_dir)/libs', |
| 119 }], |
| 120 ], |
| 121 }, |
| 122 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', |
114 }, | 123 }, |
115 # Pass the jar path to the apk's "fake" jar target. This would be better as | 124 # Pass the jar path to the apk's "fake" jar target. This would be better as |
116 # direct_dependent_settings, but a variable set by a direct_dependent_settings | 125 # direct_dependent_settings, but a variable set by a direct_dependent_settings |
117 # cannot be lifted in a dependent to all_dependent_settings. | 126 # cannot be lifted in a dependent to all_dependent_settings. |
118 'all_dependent_settings': { | 127 'all_dependent_settings': { |
119 'variables': { | 128 'variables': { |
120 'apk_output_jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', | 129 'apk_output_jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', |
121 }, | 130 }, |
122 }, | 131 }, |
123 'conditions': [ | 132 'conditions': [ |
(...skipping 13 matching lines...) Expand all Loading... |
137 }], | 146 }], |
138 ['native_lib_target != "" and component == "shared_library"', { | 147 ['native_lib_target != "" and component == "shared_library"', { |
139 'dependencies': [ | 148 'dependencies': [ |
140 '<(DEPTH)/build/android/setup.gyp:copy_system_libraries', | 149 '<(DEPTH)/build/android/setup.gyp:copy_system_libraries', |
141 ], | 150 ], |
142 }], | 151 }], |
143 ['native_lib_target != ""', { | 152 ['native_lib_target != ""', { |
144 'variables': { | 153 'variables': { |
145 'compile_input_paths': [ '<(native_libraries_java_stamp)' ], | 154 'compile_input_paths': [ '<(native_libraries_java_stamp)' ], |
146 'generated_src_dirs': [ '<(native_libraries_java_dir)' ], | 155 'generated_src_dirs': [ '<(native_libraries_java_dir)' ], |
147 'native_libs_paths': ['<(SHARED_LIB_DIR)/<(native_lib_target).>(android_
product_extension)'], | 156 'native_libs_paths': [ |
| 157 '<(SHARED_LIB_DIR)/<(native_lib_target).>(android_product_extension)' |
| 158 ], |
| 159 'package_input_paths': [ |
| 160 '<(apk_package_native_libs_dir)/<(android_app_abi)/gdbserver', |
| 161 ], |
148 }, | 162 }, |
| 163 'copies': [ |
| 164 { |
| 165 # gdbserver is always copied into the APK's native libs dir. The ant |
| 166 # build scripts (apkbuilder task) will only include it in a debug |
| 167 # build. |
| 168 'destination': '<(apk_package_native_libs_dir)/<(android_app_abi)', |
| 169 'files': [ |
| 170 '<(android_gdbserver)', |
| 171 ], |
| 172 }, |
| 173 ], |
149 'actions': [ | 174 'actions': [ |
150 { | 175 { |
151 'variables': { | 176 'variables': { |
152 'input_libraries': ['<@(native_libs_paths)'], | 177 'input_libraries': ['<@(native_libs_paths)'], |
153 }, | 178 }, |
154 'includes': ['../build/android/write_ordered_libraries.gypi'], | 179 'includes': ['../build/android/write_ordered_libraries.gypi'], |
155 }, | 180 }, |
156 { | 181 { |
157 'action_name': 'native_libraries_template_data_<(_target_name)', | 182 'action_name': 'native_libraries_template_data_<(_target_name)', |
158 'message': 'Creating native_libraries_list.h for <(_target_name).', | 183 'message': 'Creating native_libraries_list.h for <(_target_name).', |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 'stripped_libraries_dir': '<(libraries_source_dir)', | 221 'stripped_libraries_dir': '<(libraries_source_dir)', |
197 'input_paths': ['<@(native_libs_paths)'], | 222 'input_paths': ['<@(native_libs_paths)'], |
198 }, | 223 }, |
199 'includes': ['../build/android/strip_native_libraries.gypi'], | 224 'includes': ['../build/android/strip_native_libraries.gypi'], |
200 }, | 225 }, |
201 ], | 226 ], |
202 'conditions': [ | 227 'conditions': [ |
203 ['gyp_managed_install == 1', { | 228 ['gyp_managed_install == 1', { |
204 'variables': { | 229 'variables': { |
205 'libraries_source_dir': '<(intermediate_dir)/lib.stripped/<(android_
app_abi)', | 230 'libraries_source_dir': '<(intermediate_dir)/lib.stripped/<(android_
app_abi)', |
206 'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed', | |
207 'device_library_dir': '<(device_intermediate_dir)/lib.stripped', | 231 'device_library_dir': '<(device_intermediate_dir)/lib.stripped', |
208 }, | 232 }, |
209 'dependencies': [ | 233 'dependencies': [ |
210 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', | 234 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', |
211 ], | 235 ], |
212 'actions': [ | 236 'actions': [ |
213 { | 237 { |
214 'includes': ['../build/android/push_libraries.gypi'], | 238 'includes': ['../build/android/push_libraries.gypi'], |
215 }, | 239 }, |
216 { | 240 { |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 '--unsigned-apk-path=<(unsigned_apk_path)', | 621 '--unsigned-apk-path=<(unsigned_apk_path)', |
598 '--final-apk-path=<(final_apk_path)', | 622 '--final-apk-path=<(final_apk_path)', |
599 '--keystore-path=<(keystore_path)', | 623 '--keystore-path=<(keystore_path)', |
600 | 624 |
601 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 625 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
602 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 626 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
603 ], | 627 ], |
604 }, | 628 }, |
605 ], | 629 ], |
606 } | 630 } |
OLD | NEW |