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