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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 'library_dexed_jars_paths': [], | 86 'library_dexed_jars_paths': [], |
| 87 'main_dex_list_path': '<(intermediate_dir)/main_dex_list.txt', | 87 'main_dex_list_path': '<(intermediate_dir)/main_dex_list.txt', |
| 88 'main_dex_list_paths': ['<(main_dex_list_path)'], | 88 'main_dex_list_paths': ['<(main_dex_list_path)'], |
| 89 'additional_src_dirs': [], | 89 'additional_src_dirs': [], |
| 90 'generated_src_dirs': [], | 90 'generated_src_dirs': [], |
| 91 'app_manifest_version_name%': '<(android_app_version_name)', | 91 'app_manifest_version_name%': '<(android_app_version_name)', |
| 92 'app_manifest_version_code%': '<(android_app_version_code)', | 92 'app_manifest_version_code%': '<(android_app_version_code)', |
| 93 # aapt generates this proguard.txt. | 93 # aapt generates this proguard.txt. |
| 94 'generated_proguard_file': '<(intermediate_dir)/proguard.txt', | 94 'generated_proguard_file': '<(intermediate_dir)/proguard.txt', |
| 95 'proguard_enabled%': 'false', | 95 'proguard_enabled%': 'false', |
| 96 'debug_build_proguard_enabled%': 'false', | |
|
jbudorick
2015/10/19 13:24:13
I really don't like doing this separately but can
| |
| 96 'proguard_flags_paths': ['<(generated_proguard_file)'], | 97 'proguard_flags_paths': ['<(generated_proguard_file)'], |
| 97 'jar_name': 'chromium_apk_<(_target_name).jar', | 98 'jar_name': 'chromium_apk_<(_target_name).jar', |
| 98 'resource_dir%':'<(DEPTH)/build/android/ant/empty/res', | 99 'resource_dir%':'<(DEPTH)/build/android/ant/empty/res', |
| 99 'R_package%':'', | 100 'R_package%':'', |
| 100 'include_all_resources%': 0, | 101 'include_all_resources%': 0, |
| 101 'additional_R_text_files': [], | 102 'additional_R_text_files': [], |
| 102 'dependencies_locale_zip_alternative_paths%': [], | 103 'dependencies_locale_zip_alternative_paths%': [], |
| 103 'dependencies_locale_zip_paths': [], | 104 'dependencies_locale_zip_paths': [], |
| 104 'dependencies_res_zip_paths': [], | 105 'dependencies_res_zip_paths': [], |
| 105 'additional_res_packages': [], | 106 'additional_res_packages': [], |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 245 # Pass the jar path to the apk's "fake" jar target. This would be better as | 246 # Pass the jar path to the apk's "fake" jar target. This would be better as |
| 246 # direct_dependent_settings, but a variable set by a direct_dependent_settings | 247 # direct_dependent_settings, but a variable set by a direct_dependent_settings |
| 247 # cannot be lifted in a dependent to all_dependent_settings. | 248 # cannot be lifted in a dependent to all_dependent_settings. |
| 248 'all_dependent_settings': { | 249 'all_dependent_settings': { |
| 249 'conditions': [ | 250 'conditions': [ |
| 250 ['proguard_enabled == "true"', { | 251 ['proguard_enabled == "true"', { |
| 251 'variables': { | 252 'variables': { |
| 252 'proguard_enabled': 'true', | 253 'proguard_enabled': 'true', |
| 253 } | 254 } |
| 254 }], | 255 }], |
| 256 ['debug_build_proguard_enabled == "true"', { | |
| 257 'variables': { | |
| 258 'debug_build_proguard_enabled': 'true', | |
| 259 } | |
| 260 }], | |
| 255 ], | 261 ], |
| 256 'variables': { | 262 'variables': { |
| 257 'apk_output_jar_path': '<(jar_path)', | 263 'apk_output_jar_path': '<(jar_path)', |
| 258 'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)', | 264 'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)', |
| 259 'tested_apk_dex_path': '<(dex_path)', | 265 'tested_apk_dex_path': '<(dex_path)', |
| 260 'tested_apk_is_multidex': '<(enable_multidex)', | 266 'tested_apk_is_multidex': '<(enable_multidex)', |
| 261 }, | 267 }, |
| 262 }, | 268 }, |
| 263 'conditions': [ | 269 'conditions': [ |
| 264 ['resource_dir!=""', { | 270 ['resource_dir!=""', { |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 993 ], | 999 ], |
| 994 'additional_obfuscate_input_paths': [ | 1000 'additional_obfuscate_input_paths': [ |
| 995 '>(tested_apk_obfuscated_jar_path).info', | 1001 '>(tested_apk_obfuscated_jar_path).info', |
| 996 ], | 1002 ], |
| 997 }], | 1003 }], |
| 998 ['proguard_enabled == "true"', { | 1004 ['proguard_enabled == "true"', { |
| 999 'additional_obfuscate_options': [ | 1005 'additional_obfuscate_options': [ |
| 1000 '--proguard-enabled', | 1006 '--proguard-enabled', |
| 1001 ], | 1007 ], |
| 1002 }], | 1008 }], |
| 1009 ['debug_build_proguard_enabled == "true"', { | |
| 1010 'additional_obfuscate_options': [ | |
| 1011 '--debug-build-proguard-enabled', | |
| 1012 ], | |
| 1013 }], | |
| 1003 ], | 1014 ], |
| 1004 'obfuscate_input_jars_paths': [ | 1015 'obfuscate_input_jars_paths': [ |
| 1005 '>@(input_jars_paths)', | 1016 '>@(input_jars_paths)', |
| 1006 '<(jar_path)', | 1017 '<(jar_path)', |
| 1007 ], | 1018 ], |
| 1008 }, | 1019 }, |
| 1009 'conditions': [ | 1020 'conditions': [ |
| 1010 ['is_test_apk == 1', { | 1021 ['is_test_apk == 1', { |
| 1011 'outputs': [ | 1022 'outputs': [ |
| 1012 '<(test_jar_path)', | 1023 '<(test_jar_path)', |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1102 ['is_test_apk == 1 and tested_apk_dex_path != "/"', { | 1113 ['is_test_apk == 1 and tested_apk_dex_path != "/"', { |
| 1103 'variables': { | 1114 'variables': { |
| 1104 'dex_additional_options': [ | 1115 'dex_additional_options': [ |
| 1105 '--excluded-paths', '@FileArg(>(tested_apk_dex_path).inputs)' | 1116 '--excluded-paths', '@FileArg(>(tested_apk_dex_path).inputs)' |
| 1106 ], | 1117 ], |
| 1107 }, | 1118 }, |
| 1108 'inputs': [ | 1119 'inputs': [ |
| 1109 '>(tested_apk_dex_path).inputs', | 1120 '>(tested_apk_dex_path).inputs', |
| 1110 ], | 1121 ], |
| 1111 }], | 1122 }], |
| 1112 ['proguard_enabled == "true"', { | 1123 ['proguard_enabled == "true" or debug_build_proguard_enabled == "true"', { |
| 1113 'inputs': [ '<(obfuscate_stamp)' ] | 1124 'inputs': [ '<(obfuscate_stamp)' ] |
| 1114 }, { | 1125 }, { |
| 1115 'inputs': [ '<(emma_instr_stamp)' ] | 1126 'inputs': [ '<(emma_instr_stamp)' ] |
| 1116 }], | 1127 }], |
| 1117 ], | 1128 ], |
| 1118 'includes': [ 'android/dex_action.gypi' ], | 1129 'includes': [ 'android/dex_action.gypi' ], |
| 1119 }, | 1130 }, |
| 1120 { | 1131 { |
| 1121 'variables': { | 1132 'variables': { |
| 1122 'local_dependencies_res_zip_paths': ['>@(dependencies_res_zip_paths)'], | 1133 'local_dependencies_res_zip_paths': ['>@(dependencies_res_zip_paths)'], |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 1150 'native_libs_dir': '<(apk_package_native_libs_dir)', | 1161 'native_libs_dir': '<(apk_package_native_libs_dir)', |
| 1151 }, { | 1162 }, { |
| 1152 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', | 1163 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', |
| 1153 }], | 1164 }], |
| 1154 ], | 1165 ], |
| 1155 }, | 1166 }, |
| 1156 'includes': ['android/apkbuilder_action.gypi'], | 1167 'includes': ['android/apkbuilder_action.gypi'], |
| 1157 }, | 1168 }, |
| 1158 ], | 1169 ], |
| 1159 } | 1170 } |
| OLD | NEW |