| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed', | 127 'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed', |
| 128 }, { | 128 }, { |
| 129 'apk_package_native_libs_dir': '<(intermediate_dir)/libs', | 129 'apk_package_native_libs_dir': '<(intermediate_dir)/libs', |
| 130 }], | 130 }], |
| 131 ], | 131 ], |
| 132 }, | 132 }, |
| 133 'native_lib_target%': '', | 133 'native_lib_target%': '', |
| 134 'emma_instrument': '<(emma_coverage)', | 134 'emma_instrument': '<(emma_coverage)', |
| 135 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', | 135 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', |
| 136 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', | 136 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', |
| 137 'extra_native_libs': [], |
| 137 }, | 138 }, |
| 138 # Pass the jar path to the apk's "fake" jar target. This would be better as | 139 # Pass the jar path to the apk's "fake" jar target. This would be better as |
| 139 # direct_dependent_settings, but a variable set by a direct_dependent_settings | 140 # direct_dependent_settings, but a variable set by a direct_dependent_settings |
| 140 # cannot be lifted in a dependent to all_dependent_settings. | 141 # cannot be lifted in a dependent to all_dependent_settings. |
| 141 'all_dependent_settings': { | 142 'all_dependent_settings': { |
| 142 'variables': { | 143 'variables': { |
| 143 'apk_output_jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', | 144 'apk_output_jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', |
| 144 }, | 145 }, |
| 145 }, | 146 }, |
| 146 'conditions': [ | 147 'conditions': [ |
| (...skipping 28 matching lines...) Expand all Loading... |
| 175 ], | 176 ], |
| 176 }, | 177 }, |
| 177 'copies': [ | 178 'copies': [ |
| 178 { | 179 { |
| 179 # gdbserver is always copied into the APK's native libs dir. The ant | 180 # gdbserver is always copied into the APK's native libs dir. The ant |
| 180 # build scripts (apkbuilder task) will only include it in a debug | 181 # build scripts (apkbuilder task) will only include it in a debug |
| 181 # build. | 182 # build. |
| 182 'destination': '<(apk_package_native_libs_dir)/<(android_app_abi)', | 183 'destination': '<(apk_package_native_libs_dir)/<(android_app_abi)', |
| 183 'files': [ | 184 'files': [ |
| 184 '<(android_gdbserver)', | 185 '<(android_gdbserver)', |
| 186 '<@(extra_native_libs)', |
| 185 ], | 187 ], |
| 186 }, | 188 }, |
| 187 ], | 189 ], |
| 188 'actions': [ | 190 'actions': [ |
| 189 { | 191 { |
| 190 'variables': { | 192 'variables': { |
| 191 'input_libraries': ['<@(native_libs_paths)'], | 193 'input_libraries': [ |
| 194 '<@(native_libs_paths)', |
| 195 '<@(extra_native_libs)', |
| 196 ], |
| 192 }, | 197 }, |
| 193 'includes': ['../build/android/write_ordered_libraries.gypi'], | 198 'includes': ['../build/android/write_ordered_libraries.gypi'], |
| 194 }, | 199 }, |
| 195 { | 200 { |
| 196 'action_name': 'native_libraries_template_data_<(_target_name)', | 201 'action_name': 'native_libraries_template_data_<(_target_name)', |
| 197 'message': 'Creating native_libraries_list.h for <(_target_name).', | 202 'message': 'Creating native_libraries_list.h for <(_target_name).', |
| 198 'inputs': [ | 203 'inputs': [ |
| 199 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 204 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 200 '<(DEPTH)/build/android/gyp/create_native_libraries_header.py', | 205 '<(DEPTH)/build/android/gyp/create_native_libraries_header.py', |
| 201 '<(ordered_libraries_file)', | 206 '<(ordered_libraries_file)', |
| (...skipping 26 matching lines...) Expand all Loading... |
| 228 '--output=<(native_libraries_java_file)', | 233 '--output=<(native_libraries_java_file)', |
| 229 '--template=<(native_libraries_template)', | 234 '--template=<(native_libraries_template)', |
| 230 '--stamp=<(native_libraries_java_stamp)', | 235 '--stamp=<(native_libraries_java_stamp)', |
| 231 ], | 236 ], |
| 232 }, | 237 }, |
| 233 { | 238 { |
| 234 'action_name': 'strip_native_libraries', | 239 'action_name': 'strip_native_libraries', |
| 235 'variables': { | 240 'variables': { |
| 236 'ordered_libraries_file%': '<(ordered_libraries_file)', | 241 'ordered_libraries_file%': '<(ordered_libraries_file)', |
| 237 'stripped_libraries_dir': '<(libraries_source_dir)', | 242 'stripped_libraries_dir': '<(libraries_source_dir)', |
| 238 'input_paths': ['<@(native_libs_paths)'], | 243 'input_paths': [ |
| 244 '<@(native_libs_paths)', |
| 245 '<@(extra_native_libs)', |
| 246 ], |
| 239 'stamp': '<(strip_stamp)' | 247 'stamp': '<(strip_stamp)' |
| 240 }, | 248 }, |
| 241 'includes': ['../build/android/strip_native_libraries.gypi'], | 249 'includes': ['../build/android/strip_native_libraries.gypi'], |
| 242 }, | 250 }, |
| 243 ], | 251 ], |
| 244 'conditions': [ | 252 'conditions': [ |
| 245 ['gyp_managed_install == 1', { | 253 ['gyp_managed_install == 1', { |
| 246 'variables': { | 254 'variables': { |
| 247 'libraries_top_dir': '<(intermediate_dir)/lib.stripped', | 255 'libraries_top_dir': '<(intermediate_dir)/lib.stripped', |
| 248 'libraries_source_dir': '<(libraries_top_dir)/lib/<(android_app_abi)
', | 256 'libraries_source_dir': '<(libraries_top_dir)/lib/<(android_app_abi)
', |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 '<(DEPTH)/build/android/ant/apk-package.xml', | 676 '<(DEPTH)/build/android/ant/apk-package.xml', |
| 669 | 677 |
| 670 # Add list of inputs to the command line, so if inputs change | 678 # Add list of inputs to the command line, so if inputs change |
| 671 # (e.g. if a Java file is removed), the command will be re-run. | 679 # (e.g. if a Java file is removed), the command will be re-run. |
| 672 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 680 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
| 673 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 681 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
| 674 ] | 682 ] |
| 675 }, | 683 }, |
| 676 ], | 684 ], |
| 677 } | 685 } |
| OLD | NEW |