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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 'compile_input_paths': [], | 78 'compile_input_paths': [], |
| 79 'package_input_paths': [], | 79 'package_input_paths': [], |
| 80 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', | 80 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', |
| 81 'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLib raries.template', | 81 'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLib raries.template', |
| 82 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', | 82 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', |
| 83 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries. java', | 83 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries. java', |
| 84 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st amp', | 84 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st amp', |
| 85 'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/ ', | 85 'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/ ', |
| 86 'native_libraries_template_data_file': '<(native_libraries_template_data_dir )/native_libraries_array.h', | 86 'native_libraries_template_data_file': '<(native_libraries_template_data_dir )/native_libraries_array.h', |
| 87 'native_libraries_template_version_file': '<(native_libraries_template_data_ dir)/native_libraries_version.h', | 87 'native_libraries_template_version_file': '<(native_libraries_template_data_ dir)/native_libraries_version.h', |
| 88 'native_libraries_cleanup_stamp': '<(intermediate_dir)/native_libraries_clea nup.stamp', | |
| 88 'compile_stamp': '<(intermediate_dir)/compile.stamp', | 89 'compile_stamp': '<(intermediate_dir)/compile.stamp', |
| 89 'lint_stamp': '<(intermediate_dir)/lint.stamp', | 90 'lint_stamp': '<(intermediate_dir)/lint.stamp', |
| 90 'lint_result': '<(intermediate_dir)/lint_result.xml', | 91 'lint_result': '<(intermediate_dir)/lint_result.xml', |
| 91 'lint_config': '<(intermediate_dir)/lint_config.xml', | 92 'lint_config': '<(intermediate_dir)/lint_config.xml', |
| 92 'never_lint%': 0, | 93 'never_lint%': 0, |
| 93 'instr_stamp': '<(intermediate_dir)/instr.stamp', | 94 'instr_stamp': '<(intermediate_dir)/instr.stamp', |
| 94 'jar_stamp': '<(intermediate_dir)/jar.stamp', | 95 'jar_stamp': '<(intermediate_dir)/jar.stamp', |
| 95 'obfuscate_stamp': '<(intermediate_dir)/obfuscate.stamp', | 96 'obfuscate_stamp': '<(intermediate_dir)/obfuscate.stamp', |
| 96 'strip_stamp': '<(intermediate_dir)/strip.stamp', | 97 'strip_stamp': '<(intermediate_dir)/strip.stamp', |
| 97 'classes_dir': '<(intermediate_dir)/classes', | 98 'classes_dir': '<(intermediate_dir)/classes', |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 176 ['native_lib_target != "" and component == "shared_library"', { | 177 ['native_lib_target != "" and component == "shared_library"', { |
| 177 'dependencies': [ | 178 'dependencies': [ |
| 178 '<(DEPTH)/build/android/setup.gyp:copy_system_libraries', | 179 '<(DEPTH)/build/android/setup.gyp:copy_system_libraries', |
| 179 ], | 180 ], |
| 180 }], | 181 }], |
| 181 ['use_chromium_linker == 1', { | 182 ['use_chromium_linker == 1', { |
| 182 'dependencies': [ | 183 'dependencies': [ |
| 183 '<(DEPTH)/base/base.gyp:chromium_android_linker', | 184 '<(DEPTH)/base/base.gyp:chromium_android_linker', |
| 184 ], | 185 ], |
| 185 }], | 186 }], |
| 187 ['native_lib_target != "" and component != "shared_library" and use_chromium _linker != 1', { | |
|
cjhopman
2014/03/17 18:32:35
I think this would be better if it just explicitly
Feng Qian
2014/03/18 00:07:01
Listing libraries to keep will have issues with bu
cjhopman
2014/03/18 00:16:55
Oh right, because this is deleting the ones in <(S
| |
| 188 # cleanup old libraries in PRODUCT_DIR and package lib directories | |
| 189 'variables': { | |
| 190 'package_input_paths': [ '<(native_libraries_cleanup_stamp)' ], | |
| 191 }, | |
| 192 'actions': [ | |
| 193 { | |
| 194 'action_name': 'cleanup_old_libraries', | |
| 195 'inputs': [ | |
| 196 '<(DEPTH)/chrome/VERSION', | |
| 197 '<(DEPTH)/build/android/gyp/delete_files.py', | |
| 198 ], | |
| 199 'outputs': [ | |
| 200 '<(native_libraries_cleanup_stamp)', | |
| 201 ], | |
| 202 'action': [ | |
| 203 'python', '<(DEPTH)/build/android/gyp/delete_files.py', | |
| 204 '--stamp=<(native_libraries_cleanup_stamp)', | |
| 205 '--pattern=<(native_lib_target).*.so*', | |
| 206 '--keep=<(native_lib_target).>(android_product_extension)*', | |
| 207 '<(SHARED_LIB_DIR)', | |
| 208 '<(apk_package_native_libs_dir)/<(android_app_abi)', | |
| 209 ], | |
| 210 }, | |
| 211 ], | |
| 212 }], | |
| 186 ['native_lib_target != ""', { | 213 ['native_lib_target != ""', { |
| 187 'variables': { | 214 'variables': { |
| 188 'compile_input_paths': [ '<(native_libraries_java_stamp)' ], | 215 'compile_input_paths': [ '<(native_libraries_java_stamp)' ], |
| 189 'generated_src_dirs': [ '<(native_libraries_java_dir)' ], | 216 'generated_src_dirs': [ '<(native_libraries_java_dir)' ], |
| 190 'native_libs_paths': [ | 217 'native_libs_paths': [ |
| 191 '<(SHARED_LIB_DIR)/<(native_lib_target).>(android_product_extension)' | 218 '<(SHARED_LIB_DIR)/<(native_lib_target).>(android_product_extension)' |
| 192 ], | 219 ], |
| 193 'package_input_paths': [ | 220 'package_input_paths': [ |
| 194 '<(apk_package_native_libs_dir)/<(android_app_abi)/gdbserver', | 221 '<(apk_package_native_libs_dir)/<(android_app_abi)/gdbserver', |
| 195 ], | 222 ], |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 756 '<(DEPTH)/build/android/ant/apk-package.xml', | 783 '<(DEPTH)/build/android/ant/apk-package.xml', |
| 757 | 784 |
| 758 # Add list of inputs to the command line, so if inputs change | 785 # Add list of inputs to the command line, so if inputs change |
| 759 # (e.g. if a Java file is removed), the command will be re-run. | 786 # (e.g. if a Java file is removed), the command will be re-run. |
| 760 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 787 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
| 761 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 788 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
| 762 ] | 789 ] |
| 763 }, | 790 }, |
| 764 ], | 791 ], |
| 765 } | 792 } |
| OLD | NEW |