Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <?xml version="1.0" encoding="UTF-8"?> | 1 <?xml version="1.0" encoding="UTF-8"?> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 <project name="chrome_sdk_overrides" > | 7 <project name="chrome_sdk_overrides" > |
| 8 <!-- | 8 <!-- |
| 9 Redefinition of targets used by SDK tools. | 9 Redefinition of targets used by SDK tools. |
| 10 Supported version: SDK tools revision 20. | 10 Supported version: SDK tools revision 20. |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 | 161 |
| 162 <!-- Zip aligns the APK --> | 162 <!-- Zip aligns the APK --> |
| 163 <zipalign-helper | 163 <zipalign-helper |
| 164 in.package="${out.unaligned.file}" | 164 in.package="${out.unaligned.file}" |
| 165 out.package="${out.final.file}" /> | 165 out.package="${out.final.file}" /> |
| 166 <echo level="info">Release Package: ${out.final.file}</echo> | 166 <echo level="info">Release Package: ${out.final.file}</echo> |
| 167 </sequential> | 167 </sequential> |
| 168 </do-only-if-not-library> | 168 </do-only-if-not-library> |
| 169 <record-build-info /> | 169 <record-build-info /> |
| 170 </target> | 170 </target> |
| 171 | |
| 172 <!-- | |
| 173 Override obfuscate target to pass javac.custom.classpath to Proguard. SDK to ols do not provide | |
| 174 any way to pass custom class paths to Proguard. | |
| 175 --> | |
| 176 <target name="-obfuscate"> | |
| 177 <if condition="${proguard.enabled}"> | |
| 178 <then> | |
| 179 <property name="obfuscate.absolute.dir" location="${out.absolute.dir}/pr oguard"/> | |
| 180 <property name="preobfuscate.jar.file" value="${obfuscate.absolute.dir}/ original.jar"/> | |
| 181 <property name="obfuscated.jar.file" value="${obfuscate.absolute.dir}/ob fuscated.jar"/> | |
| 182 <!-- input for dex will be proguard's output --> | |
| 183 <property name="out.dex.input.absolute.dir" value="${obfuscated.jar.file }"/> | |
| 184 | |
| 185 <!-- Add Proguard Tasks --> | |
| 186 <property name="proguard.jar" location="${android.tools.dir}/proguard/li b/proguard.jar"/> | |
| 187 <taskdef name="proguard" classname="proguard.ant.ProGuardTask" classpath ="${proguard.jar}"/> | |
| 188 | |
| 189 <!-- Set the android classpath Path object into a single property. It'll be | |
| 190 all the jar files separated by a platform path-separator. | |
| 191 Each path must be quoted if it contains spaces. | |
| 192 --> | |
| 193 <pathconvert property="project.target.classpath.value" refid="project.ta rget.class.path"> | |
| 194 <firstmatchmapper> | |
| 195 <regexpmapper from='^([^ ]*)( .*)$$' to='"\1\2"'/> | |
| 196 <identitymapper/> | |
| 197 </firstmatchmapper> | |
| 198 </pathconvert> | |
| 199 | |
| 200 <!-- Build a path object with all the jar files that must be obfuscated. | |
| 201 This include the project compiled source code and any 3rd party jar | |
| 202 files. --> | |
| 203 <path id="project.all.classes.path"> | |
| 204 <pathelement location="${preobfuscate.jar.file}"/> | |
| 205 <path refid="project.all.jars.path"/> | |
| 206 <!-- Pass javac.custom.classpath for apks. --> | |
| 207 <path refid="javac.custom.classpath"/> | |
|
shashi
2012/10/08 18:50:37
Relevant change here.
| |
| 208 </path> | |
| 209 <!-- Set the project jar files Path object into a single property. It'll be | |
| 210 all the jar files separated by a platform path-separator. | |
| 211 Each path must be quoted if it contains spaces. | |
| 212 --> | |
| 213 <pathconvert property="project.all.classes.value" refid="project.all.cla sses.path"> | |
| 214 <firstmatchmapper> | |
| 215 <regexpmapper from='^([^ ]*)( .*)$$' to='"\1\2"'/> | |
| 216 <identitymapper/> | |
| 217 </firstmatchmapper> | |
| 218 </pathconvert> | |
| 219 | |
| 220 <!-- Turn the path property ${proguard.config} from an A:B:C property | |
| 221 into a series of includes: -include A -include B -include C | |
| 222 suitable for processing by the ProGuard task. Note - this does | |
| 223 not include the leading '-include "' or the closing '"'; those | |
| 224 are added under the <proguard> call below. | |
| 225 --> | |
| 226 <path id="proguard.configpath"> | |
| 227 <pathelement path="${proguard.config}"/> | |
| 228 </path> | |
| 229 <pathconvert pathsep='" -include "' property="proguard.configcmd" | |
| 230 refid="proguard.configpath"/> | |
| 231 | |
| 232 <mkdir dir="${obfuscate.absolute.dir}"/> | |
| 233 <delete file="${preobfuscate.jar.file}"/> | |
| 234 <delete file="${obfuscated.jar.file}"/> | |
| 235 <jar basedir="${out.classes.absolute.dir}" | |
| 236 destfile="${preobfuscate.jar.file}"/> | |
| 237 <proguard> | |
| 238 -include "${proguard.configcmd}" | |
| 239 -include "${out.absolute.dir}/proguard.txt" | |
| 240 -injars ${project.all.classes.value} | |
| 241 -outjars "${obfuscated.jar.file}" | |
| 242 -libraryjars ${project.target.classpath.value} | |
| 243 -dump "${obfuscate.absolute.dir}/dump.txt" | |
| 244 -printseeds "${obfuscate.absolute.dir}/seeds.txt" | |
| 245 -printusage "${obfuscate.absolute.dir}/usage.txt" | |
| 246 -printmapping "${obfuscate.absolute.dir}/mapping.txt" | |
| 247 </proguard> | |
| 248 </then> | |
| 249 </if> | |
| 250 </target> | |
| 171 </project> | 251 </project> |
| OLD | NEW |