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)', | |
169 '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)', | 168 '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)', |
170 '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)', | 169 '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)', |
171 '-DAPP_MANIFEST_VERSION_NAME=<(app_manifest_version_name)', | 170 '-DAPP_MANIFEST_VERSION_NAME=<(app_manifest_version_name)', |
172 '-DAPP_MANIFEST_VERSION_CODE=<(app_manifest_version_code)', | 171 '-DAPP_MANIFEST_VERSION_CODE=<(app_manifest_version_code)', |
173 '-DPROGUARD_FLAGS=>(proguard_flags)', | 172 '-DPROGUARD_FLAGS=>(proguard_flags)', |
174 '-DPROGUARD_ENABLED=>(proguard_enabled)', | 173 '-DPROGUARD_ENABLED=>(proguard_enabled)', |
175 | 174 |
176 '-Dbasedir=<(java_in_dir)', | 175 '-Dbasedir=<(java_in_dir)', |
177 '-buildfile', | 176 '-buildfile', |
178 '<(DEPTH)/build/android/ant/chromium-apk.xml', | 177 '<(DEPTH)/build/android/ant/chromium-apk.xml', |
179 | 178 |
180 # Specify CONFIGURATION_NAME as the target for ant to build. The | 179 # Specify CONFIGURATION_NAME as the target for ant to build. The |
181 # buildfile will then build the appropriate SDK tools target. | 180 # buildfile will then build the appropriate SDK tools target. |
182 '<(CONFIGURATION_NAME)', | 181 '<(CONFIGURATION_NAME)', |
183 ] | 182 ] |
184 }, | 183 }, |
185 ], | 184 ], |
186 'conditions': [ | 185 'conditions': [ |
187 ['R_package != ""', { | 186 ['R_package != ""', { |
188 'variables': { | 187 'variables': { |
189 # 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 |
190 # listed in the AndroidManifest.xml, which is unavoidable). | 189 # listed in the AndroidManifest.xml, which is unavoidable). |
191 'additional_res_dirs': ['<(DEPTH)/build/android/ant/empty/res'], | 190 'additional_res_dirs': ['<(DEPTH)/build/android/ant/empty/res'], |
192 'additional_res_packages': ['<(R_package)'], | 191 'additional_res_packages': ['<(R_package)'], |
193 'additional_R_text_files': ['<(PRODUCT_DIR)/<(package_name)/R.txt'], | |
194 }, | 192 }, |
195 }], | 193 }], |
196 ], | 194 ], |
197 } | 195 } |
OLD | NEW |