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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 'conditions': [ | 130 'conditions': [ |
131 ['resource_dir!=""', { | 131 ['resource_dir!=""', { |
132 'inputs': ['<!@(find <(java_in_dir)/<(resource_dir) -name "*")'] | 132 'inputs': ['<!@(find <(java_in_dir)/<(resource_dir) -name "*")'] |
133 }], | 133 }], |
134 ['is_test_apk == 1', { | 134 ['is_test_apk == 1', { |
135 'variables': { | 135 'variables': { |
136 'additional_res_dirs=': [], | 136 'additional_res_dirs=': [], |
137 'additional_res_packages=': [], | 137 'additional_res_packages=': [], |
138 } | 138 } |
139 }], | 139 }], |
| 140 ['proguard_enabled == "true" and proguard_flags != ""', { |
| 141 'inputs': ['<(java_in_dir)/<(proguard_flags)'] |
| 142 }] |
140 ], | 143 ], |
141 'outputs': [ | 144 'outputs': [ |
142 '<(PRODUCT_DIR)/apks/<(apk_name).apk', | 145 '<(PRODUCT_DIR)/apks/<(apk_name).apk', |
143 ], | 146 ], |
144 'action': [ | 147 'action': [ |
145 'ant', | 148 'ant', |
146 '-DAPP_ABI=<(android_app_abi)', | 149 '-DAPP_ABI=<(android_app_abi)', |
147 '-DANDROID_GDBSERVER=<(android_gdbserver)', | 150 '-DANDROID_GDBSERVER=<(android_gdbserver)', |
148 '-DANDROID_SDK=<(android_sdk)', | 151 '-DANDROID_SDK=<(android_sdk)', |
149 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | 152 '-DANDROID_SDK_ROOT=<(android_sdk_root)', |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 ['R_package != ""', { | 186 ['R_package != ""', { |
184 'variables': { | 187 'variables': { |
185 # We generate R.java in package R_package (in addition to the package | 188 # We generate R.java in package R_package (in addition to the package |
186 # listed in the AndroidManifest.xml, which is unavoidable). | 189 # listed in the AndroidManifest.xml, which is unavoidable). |
187 'additional_res_dirs': ['<(DEPTH)/build/android/ant/empty/res'], | 190 'additional_res_dirs': ['<(DEPTH)/build/android/ant/empty/res'], |
188 'additional_res_packages': ['<(R_package)'], | 191 'additional_res_packages': ['<(R_package)'], |
189 }, | 192 }, |
190 }], | 193 }], |
191 ], | 194 ], |
192 } | 195 } |
OLD | NEW |