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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 '-DPRODUCT_DIR=<(ant_build_out)', | 158 '-DPRODUCT_DIR=<(ant_build_out)', |
159 | 159 |
160 '-DAPK_NAME=<(apk_name)', | 160 '-DAPK_NAME=<(apk_name)', |
161 '-DASSET_DIR=<(asset_location)', | 161 '-DASSET_DIR=<(asset_location)', |
162 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', | 162 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', |
163 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', | 163 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', |
164 '-DINPUT_JARS_PATHS=>(input_jars_paths)', | 164 '-DINPUT_JARS_PATHS=>(input_jars_paths)', |
165 '-DJAR_NAME=<(jar_name)', | 165 '-DJAR_NAME=<(jar_name)', |
166 '-DPACKAGE_NAME=<(package_name)', | 166 '-DPACKAGE_NAME=<(package_name)', |
167 '-DRESOURCE_DIR=<(resource_dir)', | 167 '-DRESOURCE_DIR=<(resource_dir)', |
| 168 '-DADDITIONAL_R_TEXT_FILES=>(additional_R_text_files)', |
168 '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)', | 169 '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)', |
169 '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)', | 170 '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)', |
170 '-DAPP_MANIFEST_VERSION_NAME=<(app_manifest_version_name)', | 171 '-DAPP_MANIFEST_VERSION_NAME=<(app_manifest_version_name)', |
171 '-DAPP_MANIFEST_VERSION_CODE=<(app_manifest_version_code)', | 172 '-DAPP_MANIFEST_VERSION_CODE=<(app_manifest_version_code)', |
172 '-DPROGUARD_FLAGS=>(proguard_flags)', | 173 '-DPROGUARD_FLAGS=>(proguard_flags)', |
173 '-DPROGUARD_ENABLED=>(proguard_enabled)', | 174 '-DPROGUARD_ENABLED=>(proguard_enabled)', |
174 | 175 |
175 '-Dbasedir=<(java_in_dir)', | 176 '-Dbasedir=<(java_in_dir)', |
176 '-buildfile', | 177 '-buildfile', |
177 '<(DEPTH)/build/android/ant/chromium-apk.xml', | 178 '<(DEPTH)/build/android/ant/chromium-apk.xml', |
178 | 179 |
179 # Specify CONFIGURATION_NAME as the target for ant to build. The | 180 # Specify CONFIGURATION_NAME as the target for ant to build. The |
180 # buildfile will then build the appropriate SDK tools target. | 181 # buildfile will then build the appropriate SDK tools target. |
181 '<(CONFIGURATION_NAME)', | 182 '<(CONFIGURATION_NAME)', |
182 ] | 183 ] |
183 }, | 184 }, |
184 ], | 185 ], |
185 'conditions': [ | 186 'conditions': [ |
186 ['R_package != ""', { | 187 ['R_package != ""', { |
187 'variables': { | 188 'variables': { |
188 # We generate R.java in package R_package (in addition to the package | 189 # We generate R.java in package R_package (in addition to the package |
189 # listed in the AndroidManifest.xml, which is unavoidable). | 190 # listed in the AndroidManifest.xml, which is unavoidable). |
190 'additional_res_dirs': ['<(DEPTH)/build/android/ant/empty/res'], | 191 'additional_res_dirs': ['<(DEPTH)/build/android/ant/empty/res'], |
191 'additional_res_packages': ['<(R_package)'], | 192 'additional_res_packages': ['<(R_package)'], |
| 193 'additional_R_text_files': ['<(PRODUCT_DIR)/<(package_name)/R.txt'], |
192 }, | 194 }, |
193 }], | 195 }], |
194 ], | 196 ], |
195 } | 197 } |
OLD | NEW |