Chromium Code Reviews| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 'strip_stamp': '<(intermediate_dir)/strip.stamp', | 124 'strip_stamp': '<(intermediate_dir)/strip.stamp', |
| 125 'stripped_libraries_dir': '<(intermediate_dir)/stripped_libraries', | 125 'stripped_libraries_dir': '<(intermediate_dir)/stripped_libraries', |
| 126 'strip_additional_stamp': '<(intermediate_dir)/strip_additional.stamp', | 126 'strip_additional_stamp': '<(intermediate_dir)/strip_additional.stamp', |
| 127 'version_stamp': '<(intermediate_dir)/version.stamp', | 127 'version_stamp': '<(intermediate_dir)/version.stamp', |
| 128 'javac_includes': [], | 128 'javac_includes': [], |
| 129 'jar_excluded_classes': [], | 129 'jar_excluded_classes': [], |
| 130 'javac_jar_path': '<(intermediate_dir)/<(_target_name).javac.jar', | 130 'javac_jar_path': '<(intermediate_dir)/<(_target_name).javac.jar', |
| 131 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', | 131 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', |
| 132 'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar', | 132 'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar', |
| 133 'test_jar_path': '<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar', | 133 'test_jar_path': '<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar', |
| 134 'dex_path': '<(intermediate_dir)/classes.dex', | 134 'enable_multidex%': 0, |
| 135 'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar', | 135 'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar', |
| 136 'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml', | 136 'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml', |
| 137 'split_android_manifest_path': '<(intermediate_dir)/split-manifests/<(androi d_app_abi)/AndroidManifest.xml', | 137 'split_android_manifest_path': '<(intermediate_dir)/split-manifests/<(androi d_app_abi)/AndroidManifest.xml', |
| 138 'push_stamp': '<(intermediate_dir)/push.stamp', | 138 'push_stamp': '<(intermediate_dir)/push.stamp', |
| 139 'link_stamp': '<(intermediate_dir)/link.stamp', | 139 'link_stamp': '<(intermediate_dir)/link.stamp', |
| 140 'resource_zip_path': '<(intermediate_dir)/<(_target_name).resources.zip', | 140 'resource_zip_path': '<(intermediate_dir)/<(_target_name).resources.zip', |
| 141 'shared_resources%': 0, | 141 'shared_resources%': 0, |
| 142 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', | 142 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', |
| 143 'final_apk_path_no_extension%': '<(PRODUCT_DIR)/apks/<(apk_name)', | 143 'final_apk_path_no_extension%': '<(PRODUCT_DIR)/apks/<(apk_name)', |
| 144 'final_abi_split_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name)-abi-<(android_ app_abi).apk', | 144 'final_abi_split_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name)-abi-<(android_ app_abi).apk', |
| 145 'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk', | 145 'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk', |
| 146 'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', | 146 'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', |
| 147 'device_intermediate_dir': '/data/data/org.chromium.gyp_managed_install/<(_t arget_name)/<(CONFIGURATION_NAME)', | 147 'device_intermediate_dir': '/data/data/org.chromium.gyp_managed_install/<(_t arget_name)/<(CONFIGURATION_NAME)', |
| 148 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', | 148 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', |
| 149 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh ', | 149 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh ', |
| 150 'create_standalone_apk%': 1, | 150 'create_standalone_apk%': 1, |
| 151 'res_v14_skip%': 0, | 151 'res_v14_skip%': 0, |
| 152 'variables': { | 152 'variables': { |
| 153 'variables': { | 153 'variables': { |
| 154 'native_lib_target%': '', | 154 'native_lib_target%': '', |
| 155 'native_lib_version_name%': '', | 155 'native_lib_version_name%': '', |
| 156 'use_chromium_linker%' : 0, | 156 'use_chromium_linker%' : 0, |
| 157 'use_relocation_packer%' : 0, | 157 'use_relocation_packer%' : 0, |
| 158 'enable_chromium_linker_tests%': 0, | 158 'enable_chromium_linker_tests%': 0, |
| 159 'is_test_apk%': 0, | 159 'is_test_apk%': 0, |
| 160 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', | 160 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', |
| 161 'unsigned_abi_split_apk_path': '<(intermediate_dir)/<(apk_name)-abi-<(an droid_app_abi)-unsigned.apk', | 161 'unsigned_abi_split_apk_path': '<(intermediate_dir)/<(apk_name)-abi-<(an droid_app_abi)-unsigned.apk', |
| 162 'create_abi_split%': 0, | 162 'create_abi_split%': 0, |
| 163 'enable_multidex%': 0, | |
| 163 }, | 164 }, |
| 164 'unsigned_apk_path': '<(unsigned_apk_path)', | 165 'unsigned_apk_path': '<(unsigned_apk_path)', |
| 165 'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)', | 166 'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)', |
| 166 'create_abi_split%': '<(create_abi_split)', | 167 'create_abi_split%': '<(create_abi_split)', |
| 167 'conditions': [ | 168 'conditions': [ |
| 168 ['gyp_managed_install == 1 and native_lib_target != ""', { | 169 ['gyp_managed_install == 1 and native_lib_target != ""', { |
| 169 'conditions': [ | 170 'conditions': [ |
| 170 ['create_abi_split == 0', { | 171 ['create_abi_split == 0', { |
| 171 'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-s tandalone-unsigned.apk', | 172 'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-s tandalone-unsigned.apk', |
| 172 }, { | 173 }, { |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 186 },{ | 187 },{ |
| 187 'emma_instrument%': 0, | 188 'emma_instrument%': 0, |
| 188 }], | 189 }], |
| 189 # When using abi splits, the abi split is modified by | 190 # When using abi splits, the abi split is modified by |
| 190 # gyp_managed_install rather than the main .apk | 191 # gyp_managed_install rather than the main .apk |
| 191 ['create_abi_split == 1', { | 192 ['create_abi_split == 1', { |
| 192 'managed_input_apk_path': '<(unsigned_abi_split_apk_path)', | 193 'managed_input_apk_path': '<(unsigned_abi_split_apk_path)', |
| 193 }, { | 194 }, { |
| 194 'managed_input_apk_path': '<(unsigned_apk_path)', | 195 'managed_input_apk_path': '<(unsigned_apk_path)', |
| 195 }], | 196 }], |
| 197 ['enable_multidex == 1', { | |
| 198 'dex_path': '<(intermediate_dir)/classes.dex.zip', | |
| 199 }, { | |
| 200 'dex_path': '<(intermediate_dir)/classes.dex', | |
| 201 }], | |
| 196 ], | 202 ], |
| 197 }, | 203 }, |
| 198 'native_lib_target%': '', | 204 'native_lib_target%': '', |
| 199 'native_lib_version_name%': '', | 205 'native_lib_version_name%': '', |
| 200 'use_chromium_linker%' : 0, | 206 'use_chromium_linker%' : 0, |
| 201 'load_library_from_zip%' : 0, | 207 'load_library_from_zip%' : 0, |
| 202 'use_relocation_packer%' : 0, | 208 'use_relocation_packer%' : 0, |
| 203 'enable_chromium_linker_tests%': 0, | 209 'enable_chromium_linker_tests%': 0, |
| 204 'emma_instrument%': '<(emma_instrument)', | 210 'emma_instrument%': '<(emma_instrument)', |
| 205 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', | 211 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', |
| 206 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', | 212 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', |
| 207 'unsigned_apk_path': '<(unsigned_apk_path)', | 213 'unsigned_apk_path': '<(unsigned_apk_path)', |
| 208 'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)', | 214 'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)', |
| 209 'create_abi_split%': '<(create_abi_split)', | 215 'create_abi_split%': '<(create_abi_split)', |
| 210 'managed_input_apk_path': '<(managed_input_apk_path)', | 216 'managed_input_apk_path': '<(managed_input_apk_path)', |
| 211 'libchromium_android_linker': 'libchromium_android_linker.>(android_product_ extension)', | 217 'libchromium_android_linker': 'libchromium_android_linker.>(android_product_ extension)', |
| 212 'extra_native_libs': [], | 218 'extra_native_libs': [], |
| 213 'native_lib_placeholder_stamp': '<(apk_package_native_libs_dir)/<(android_ap p_abi)/native_lib_placeholder.stamp', | 219 'native_lib_placeholder_stamp': '<(apk_package_native_libs_dir)/<(android_ap p_abi)/native_lib_placeholder.stamp', |
| 214 'native_lib_placeholders': [], | 220 'native_lib_placeholders': [], |
| 215 'main_apk_name': '<(apk_name)', | 221 'main_apk_name': '<(apk_name)', |
| 222 'dex_path': '<(dex_path)', | |
| 216 'enable_errorprone%': '0', | 223 'enable_errorprone%': '0', |
| 217 'errorprone_exe_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone', | 224 'errorprone_exe_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone', |
| 218 }, | 225 }, |
| 219 # Pass the jar path to the apk's "fake" jar target. This would be better as | 226 # Pass the jar path to the apk's "fake" jar target. This would be better as |
| 220 # direct_dependent_settings, but a variable set by a direct_dependent_settings | 227 # direct_dependent_settings, but a variable set by a direct_dependent_settings |
| 221 # cannot be lifted in a dependent to all_dependent_settings. | 228 # cannot be lifted in a dependent to all_dependent_settings. |
| 222 'all_dependent_settings': { | 229 'all_dependent_settings': { |
| 223 'conditions': [ | 230 'conditions': [ |
| 224 ['proguard_enabled == "true"', { | 231 ['proguard_enabled == "true"', { |
| 225 'variables': { | 232 'variables': { |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 986 '--proguard-jar-path', '<(android_sdk_root)/tools/proguard/lib/proguard. jar', | 993 '--proguard-jar-path', '<(android_sdk_root)/tools/proguard/lib/proguard. jar', |
| 987 | 994 |
| 988 '--stamp', '<(obfuscate_stamp)', | 995 '--stamp', '<(obfuscate_stamp)', |
| 989 | 996 |
| 990 '>@(additional_obfuscate_options)', | 997 '>@(additional_obfuscate_options)', |
| 991 ], | 998 ], |
| 992 }, | 999 }, |
| 993 { | 1000 { |
| 994 'action_name': 'dex_<(_target_name)', | 1001 'action_name': 'dex_<(_target_name)', |
| 995 'variables': { | 1002 'variables': { |
| 1003 'dex_additional_options': [], | |
| 996 'dex_input_paths': [ | 1004 'dex_input_paths': [ |
| 997 '>@(library_dexed_jars_paths)', | |
| 998 '<(jar_path)', | 1005 '<(jar_path)', |
| 999 ], | 1006 ], |
| 1000 'output_path': '<(dex_path)', | 1007 'output_path': '<(dex_path)', |
| 1001 'proguard_enabled_input_path': '<(obfuscated_jar_path)', | 1008 'proguard_enabled_input_path': '<(obfuscated_jar_path)', |
| 1002 }, | 1009 }, |
| 1010 'conditions': [ | |
| 1011 ['enable_multidex == 1', { | |
| 1012 'variables': { | |
| 1013 'main_dex_rules_file': '<(DEPTH)/build/android/main_dex_classes.rule s', | |
|
Yaron
2015/08/05 21:56:41
Is this supposed to be added? It's not generated,
jbudorick
2015/08/05 22:55:22
Missed it because *.rules is in the .gitignore. Re
| |
| 1014 'dex_additional_options': [ | |
| 1015 '--multi-dex', | |
| 1016 '--main-dex-rules-file', '<(main_dex_rules_file)', | |
| 1017 ], | |
| 1018 'dex_input_paths': [ | |
| 1019 '>@(input_jars_paths)', | |
| 1020 ], | |
| 1021 }, | |
| 1022 'inputs': [ | |
| 1023 '<(main_dex_rules_file)', | |
| 1024 ], | |
| 1025 }, { | |
| 1026 'variables': { | |
| 1027 'dex_input_paths': [ | |
| 1028 '>@(library_dexed_jars_paths)', | |
| 1029 ], | |
| 1030 }, | |
| 1031 }] | |
| 1032 ], | |
| 1003 'target_conditions': [ | 1033 'target_conditions': [ |
| 1004 ['emma_instrument != 0', { | 1034 ['emma_instrument != 0', { |
| 1005 'variables': { | 1035 'variables': { |
| 1006 'dex_no_locals': 1, | 1036 'dex_no_locals': 1, |
| 1007 'dex_input_paths': [ | 1037 'dex_input_paths': [ |
| 1008 '<(emma_device_jar)' | 1038 '<(emma_device_jar)' |
| 1009 ], | 1039 ], |
| 1010 }, | 1040 }, |
| 1011 }], | 1041 }], |
| 1012 ['is_test_apk == 1 and tested_apk_dex_path != "/"', { | 1042 ['is_test_apk == 1 and tested_apk_dex_path != "/"', { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1054 'native_libs_dir': '<(apk_package_native_libs_dir)', | 1084 'native_libs_dir': '<(apk_package_native_libs_dir)', |
| 1055 }, { | 1085 }, { |
| 1056 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', | 1086 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', |
| 1057 }], | 1087 }], |
| 1058 ], | 1088 ], |
| 1059 }, | 1089 }, |
| 1060 'includes': ['android/apkbuilder_action.gypi'], | 1090 'includes': ['android/apkbuilder_action.gypi'], |
| 1061 }, | 1091 }, |
| 1062 ], | 1092 ], |
| 1063 } | 1093 } |
| OLD | NEW |