| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 }, | 70 }, |
| 71 'sources': [ | 71 'sources': [ |
| 72 '<@(native_libs_paths)' | 72 '<@(native_libs_paths)' |
| 73 ], | 73 ], |
| 74 'rules': [ | 74 'rules': [ |
| 75 { | 75 { |
| 76 'rule_name': 'copy_and_strip_native_libraries', | 76 'rule_name': 'copy_and_strip_native_libraries', |
| 77 'extension': 'so', | 77 'extension': 'so', |
| 78 'variables': { | 78 'variables': { |
| 79 'stripped_library_path': '<(PRODUCT_DIR)/<(package_name)/libs/<(android_
app_abi)/<(RULE_INPUT_ROOT).so', | 79 'stripped_library_path': '<(PRODUCT_DIR)/<(package_name)/libs/<(android_
app_abi)/<(RULE_INPUT_ROOT).so', |
| 80 'link_dir': '<(android_product_out)/symbols/data/data/<(manifest_package
_name)/lib/', | |
| 81 }, | 80 }, |
| 82 'outputs': [ | 81 'outputs': [ |
| 83 '<(stripped_library_path)', | 82 '<(stripped_library_path)', |
| 84 '<(link_dir)/<(RULE_INPUT_ROOT).so', | |
| 85 ], | 83 ], |
| 86 # There is no way to do 2 actions for each source library in gyp. So to | 84 # There is no way to do 2 actions for each source library in gyp. So to |
| 87 # both strip the library and create the link in <(link_dir) a separate | 85 # both strip the library and create the link in <(link_dir) a separate |
| 88 # script is required. | 86 # script is required. |
| 89 'action': [ | 87 'action': [ |
| 90 '<(DEPTH)/build/android/prepare_library_for_apk', | 88 '<(DEPTH)/build/android/prepare_library_for_apk', |
| 91 '<(android_strip)', | 89 '<(android_strip)', |
| 92 '<(RULE_INPUT_PATH)', | 90 '<(RULE_INPUT_PATH)', |
| 93 '<(stripped_library_path)', | 91 '<(stripped_library_path)', |
| 94 '<(link_dir)', | |
| 95 ], | 92 ], |
| 96 }, | 93 }, |
| 97 ], | 94 ], |
| 98 'actions': [ | 95 'actions': [ |
| 99 { | 96 { |
| 100 'action_name': 'ant_<(package_name)_apk', | 97 'action_name': 'ant_<(package_name)_apk', |
| 101 'message': 'Building <(package_name) apk.', | 98 'message': 'Building <(package_name) apk.', |
| 102 'inputs': [ | 99 'inputs': [ |
| 103 '<(java_in_dir)/AndroidManifest.xml', | 100 '<(java_in_dir)/AndroidManifest.xml', |
| 104 '<(DEPTH)/build/android/ant/chromium-apk.xml', | 101 '<(DEPTH)/build/android/ant/chromium-apk.xml', |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 '-buildfile', | 145 '-buildfile', |
| 149 '<(DEPTH)/build/android/ant/chromium-apk.xml', | 146 '<(DEPTH)/build/android/ant/chromium-apk.xml', |
| 150 | 147 |
| 151 # Specify CONFIGURATION_NAME as the target for ant to build. The | 148 # Specify CONFIGURATION_NAME as the target for ant to build. The |
| 152 # buildfile will then build the appropriate SDK tools target. | 149 # buildfile will then build the appropriate SDK tools target. |
| 153 '<(CONFIGURATION_NAME)', | 150 '<(CONFIGURATION_NAME)', |
| 154 ] | 151 ] |
| 155 }, | 152 }, |
| 156 ], | 153 ], |
| 157 } | 154 } |
| OLD | NEW |