| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 # Allow icu data, v8 snapshots, and pak files to be loaded directly from the
.apk. | 107 # Allow icu data, v8 snapshots, and pak files to be loaded directly from the
.apk. |
| 108 # Note: These are actually suffix matches, not necessarily extensions. | 108 # Note: These are actually suffix matches, not necessarily extensions. |
| 109 'extensions_to_not_compress%': '.dat,.bin,.pak', | 109 'extensions_to_not_compress%': '.dat,.bin,.pak', |
| 110 'resource_input_paths': [], | 110 'resource_input_paths': [], |
| 111 'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)', | 111 'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)', |
| 112 'asset_location%': '<(intermediate_dir)/assets', | 112 'asset_location%': '<(intermediate_dir)/assets', |
| 113 'codegen_stamp': '<(intermediate_dir)/codegen.stamp', | 113 'codegen_stamp': '<(intermediate_dir)/codegen.stamp', |
| 114 'package_input_paths': [], | 114 'package_input_paths': [], |
| 115 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', | 115 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', |
| 116 'additional_ordered_libraries_file': '<(intermediate_dir)/additional_native_
libraries.json', | 116 'additional_ordered_libraries_file': '<(intermediate_dir)/additional_native_
libraries.json', |
| 117 'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLib
raries.template', | |
| 118 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', | 117 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', |
| 119 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries.
java', | |
| 120 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st
amp', | 118 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st
amp', |
| 121 'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/
', | 119 'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/
', |
| 122 'native_libraries_template_data_file': '<(native_libraries_template_data_dir
)/native_libraries_array.h', | 120 'native_libraries_template_data_file': '<(native_libraries_template_data_dir
)/native_libraries_array.h', |
| 123 'native_libraries_template_version_file': '<(native_libraries_template_data_
dir)/native_libraries_version.h', | 121 'native_libraries_template_version_file': '<(native_libraries_template_data_
dir)/native_libraries_version.h', |
| 124 'compile_stamp': '<(intermediate_dir)/compile.stamp', | 122 'compile_stamp': '<(intermediate_dir)/compile.stamp', |
| 125 'lint_stamp': '<(intermediate_dir)/lint.stamp', | 123 'lint_stamp': '<(intermediate_dir)/lint.stamp', |
| 126 'lint_result': '<(intermediate_dir)/lint_result.xml', | 124 'lint_result': '<(intermediate_dir)/lint_result.xml', |
| 127 'lint_config': '<(intermediate_dir)/lint_config.xml', | 125 'lint_config': '<(intermediate_dir)/lint_config.xml', |
| 128 'never_lint%': 0, | 126 'never_lint%': 0, |
| 129 'findbugs_stamp': '<(intermediate_dir)/findbugs.stamp', | 127 'findbugs_stamp': '<(intermediate_dir)/findbugs.stamp', |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', | 173 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', |
| 176 'unsigned_abi_split_apk_path': '<(intermediate_dir)/<(apk_name)-abi-<(an
droid_app_abi)-unsigned.apk', | 174 'unsigned_abi_split_apk_path': '<(intermediate_dir)/<(apk_name)-abi-<(an
droid_app_abi)-unsigned.apk', |
| 177 'create_abi_split%': 0, | 175 'create_abi_split%': 0, |
| 178 'enable_multidex%': 0, | 176 'enable_multidex%': 0, |
| 179 }, | 177 }, |
| 180 'unsigned_apk_path': '<(unsigned_apk_path)', | 178 'unsigned_apk_path': '<(unsigned_apk_path)', |
| 181 'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)', | 179 'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)', |
| 182 'create_abi_split%': '<(create_abi_split)', | 180 'create_abi_split%': '<(create_abi_split)', |
| 183 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', | 181 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', |
| 184 'conditions': [ | 182 'conditions': [ |
| 183 ['is_test_apk == 1', { |
| 184 'native_libraries_template': '<(DEPTH)/base/test/android/java/template
s/NativeTestLibraries.template', |
| 185 'native_libraries_java_file_name': 'NativeTestLibraries.java', |
| 186 }, { |
| 187 'native_libraries_template': '<(DEPTH)/base/android/java/templates/Nat
iveLibraries.template', |
| 188 'native_libraries_java_file_name': 'NativeLibraries.java', |
| 189 }], |
| 185 ['gyp_managed_install == 1 and native_lib_target != ""', { | 190 ['gyp_managed_install == 1 and native_lib_target != ""', { |
| 186 'conditions': [ | 191 'conditions': [ |
| 187 ['create_abi_split == 0', { | 192 ['create_abi_split == 0', { |
| 188 'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-s
tandalone-unsigned.apk', | 193 'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-s
tandalone-unsigned.apk', |
| 189 }, { | 194 }, { |
| 190 'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-a
bi-<(android_app_abi)-standalone-unsigned.apk', | 195 'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-a
bi-<(android_app_abi)-standalone-unsigned.apk', |
| 191 }], | 196 }], |
| 192 ], | 197 ], |
| 193 }, { | 198 }, { |
| 194 'unsigned_standalone_apk_path': '<(unsigned_apk_path)', | 199 'unsigned_standalone_apk_path': '<(unsigned_apk_path)', |
| (...skipping 17 matching lines...) Expand all Loading... |
| 212 }], | 217 }], |
| 213 ['enable_multidex == 1', { | 218 ['enable_multidex == 1', { |
| 214 'dex_path': '<(intermediate_dir)/classes.dex.zip', | 219 'dex_path': '<(intermediate_dir)/classes.dex.zip', |
| 215 }, { | 220 }, { |
| 216 'dex_path': '<(intermediate_dir)/classes.dex', | 221 'dex_path': '<(intermediate_dir)/classes.dex', |
| 217 }], | 222 }], |
| 218 ], | 223 ], |
| 219 }, | 224 }, |
| 220 'native_lib_target%': '', | 225 'native_lib_target%': '', |
| 221 'native_lib_version_name%': '', | 226 'native_lib_version_name%': '', |
| 227 'native_libraries_template': '<(native_libraries_template)', |
| 228 'native_libraries_java_file': '<(native_libraries_java_dir)/<(native_librari
es_java_file_name)', |
| 222 'use_chromium_linker%' : 0, | 229 'use_chromium_linker%' : 0, |
| 223 'load_library_from_zip%' : 0, | 230 'load_library_from_zip%' : 0, |
| 224 'use_relocation_packer%' : 0, | 231 'use_relocation_packer%' : 0, |
| 225 'enable_chromium_linker_tests%': 0, | 232 'enable_chromium_linker_tests%': 0, |
| 226 'emma_instrument%': '<(emma_instrument)', | 233 'emma_instrument%': '<(emma_instrument)', |
| 227 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', | 234 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', |
| 228 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', | 235 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', |
| 229 'unsigned_apk_path': '<(unsigned_apk_path)', | 236 'unsigned_apk_path': '<(unsigned_apk_path)', |
| 230 'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)', | 237 'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)', |
| 231 'create_abi_split%': '<(create_abi_split)', | 238 'create_abi_split%': '<(create_abi_split)', |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 403 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 397 '<(DEPTH)/build/android/gyp/gcc_preprocess.py', | 404 '<(DEPTH)/build/android/gyp/gcc_preprocess.py', |
| 398 '<(ordered_libraries_file)', | 405 '<(ordered_libraries_file)', |
| 399 '<(native_libraries_template)', | 406 '<(native_libraries_template)', |
| 400 ], | 407 ], |
| 401 'outputs': [ | 408 'outputs': [ |
| 402 '<(native_libraries_java_stamp)', | 409 '<(native_libraries_java_stamp)', |
| 403 ], | 410 ], |
| 404 'action': [ | 411 'action': [ |
| 405 'python', '<(DEPTH)/build/android/gyp/gcc_preprocess.py', | 412 'python', '<(DEPTH)/build/android/gyp/gcc_preprocess.py', |
| 406 '--include-path=', | 413 '--include-path=<(DEPTH)', |
| 407 '--output=<(native_libraries_java_file)', | 414 '--output=<(native_libraries_java_file)', |
| 408 '--template=<(native_libraries_template)', | 415 '--template=<(native_libraries_template)', |
| 409 '--stamp=<(native_libraries_java_stamp)', | 416 '--stamp=<(native_libraries_java_stamp)', |
| 410 '--defines', 'NATIVE_LIBRARIES_LIST=@FileArg(<(ordered_libraries_fil
e):java_libraries_list)', | 417 '--defines', 'NATIVE_LIBRARIES_LIST=@FileArg(<(ordered_libraries_fil
e):java_libraries_list)', |
| 411 '--defines', 'NATIVE_LIBRARIES_VERSION_NUMBER="<(native_lib_version_
name)"', | 418 '--defines', 'NATIVE_LIBRARIES_VERSION_NUMBER="<(native_lib_version_
name)"', |
| 412 '<@(gcc_preprocess_defines)', | 419 '<@(gcc_preprocess_defines)', |
| 413 ], | 420 ], |
| 414 }, | 421 }, |
| 415 { | 422 { |
| 416 'action_name': 'strip_native_libraries', | 423 'action_name': 'strip_native_libraries', |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 'native_libs_dir': '<(apk_package_native_libs_dir)', | 1212 'native_libs_dir': '<(apk_package_native_libs_dir)', |
| 1206 }, { | 1213 }, { |
| 1207 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', | 1214 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', |
| 1208 }], | 1215 }], |
| 1209 ], | 1216 ], |
| 1210 }, | 1217 }, |
| 1211 'includes': ['android/apkbuilder_action.gypi'], | 1218 'includes': ['android/apkbuilder_action.gypi'], |
| 1212 }, | 1219 }, |
| 1213 ], | 1220 ], |
| 1214 } | 1221 } |
| OLD | NEW |