| 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 16 matching lines...) Expand all Loading... |
| 27 <!-- | 27 <!-- |
| 28 Override the -compile target. | 28 Override the -compile target. |
| 29 This target requires 'javac.custom.classpath' to be set to reference | 29 This target requires 'javac.custom.classpath' to be set to reference |
| 30 of classpath to be used for javac. Also accepts custom path for | 30 of classpath to be used for javac. Also accepts custom path for |
| 31 sources: 'javac.custom.sourcepath'. | 31 sources: 'javac.custom.sourcepath'. |
| 32 --> | 32 --> |
| 33 <target | 33 <target |
| 34 name="-compile" | 34 name="-compile" |
| 35 depends="-build-setup, -pre-build, -code-gen, -pre-compile"> | 35 depends="-build-setup, -pre-build, -code-gen, -pre-compile"> |
| 36 <do-only-if-manifest-hasCode elseText="hasCode = false. Skipping..." > | 36 <do-only-if-manifest-hasCode elseText="hasCode = false. Skipping..." > |
| 37 <!-- If souce path is not set, then use the default value --> | 37 <!-- If javac.srcdirs.additional isn't set, set it to an empty path. --> |
| 38 <if> | 38 <if> |
| 39 <condition> | 39 <condition> |
| 40 <not> | 40 <not> |
| 41 <isreference refid="javac.custom.sourcepath"/> | 41 <isreference refid="javac.srcdirs.additional"/> |
| 42 </not> | 42 </not> |
| 43 </condition> | 43 </condition> |
| 44 <then> | 44 <then> |
| 45 <path id="javac.custom.sourcepath"> | 45 <path id="javac.srcdirs.additional"/> |
| 46 <pathelement path="${source.absolute.dir}"/> | |
| 47 <pathelement path="${gen.absolute.dir}"/> | |
| 48 </path> | |
| 49 </then> | 46 </then> |
| 50 </if> | 47 </if> |
| 51 <javac | 48 <javac |
| 52 bootclasspathref="project.target.class.path" | 49 bootclasspathref="project.target.class.path" |
| 53 classpathref="javac.custom.classpath" | 50 classpathref="javac.custom.classpath" |
| 54 debug="true" | 51 debug="true" |
| 55 destdir="${out.classes.absolute.dir}" | 52 destdir="${out.classes.absolute.dir}" |
| 56 encoding="${java.encoding}" | 53 encoding="${java.encoding}" |
| 57 extdirs="" | 54 extdirs="" |
| 58 fork="${need.javac.fork}" | 55 fork="${need.javac.fork}" |
| 59 includeantruntime="false" | 56 includeantruntime="false" |
| 60 source="${java.source}" | 57 source="${java.source}" |
| 61 target="${java.target}" | 58 target="${java.target}" |
| 62 verbose="${verbose}"> | 59 verbose="${verbose}"> |
| 63 <src path="${source.absolute.dir}"/> | 60 <src path="${source.absolute.dir}"/> |
| 64 <src path="${gen.absolute.dir}"/> | 61 <src path="${gen.absolute.dir}"/> |
| 65 <src> | 62 <src> |
| 66 <path refid="javac.custom.sourcepath"/> | 63 <path refid="javac.srcdirs.additional"/> |
| 67 </src> | 64 </src> |
| 68 <compilerarg line="${java.compilerargs}"/> | 65 <compilerarg line="${java.compilerargs}"/> |
| 69 </javac> | 66 </javac> |
| 70 <!-- | 67 <!-- |
| 71 If the project is instrumented, then instrument the classes | 68 If the project is instrumented, then instrument the classes |
| 72 TODO(shashishekhar): Add option to override emma filter. | 69 TODO(shashishekhar): Add option to override emma filter. |
| 73 --> | 70 --> |
| 74 <if condition="${build.is.instrumented}"> | 71 <if condition="${build.is.instrumented}"> |
| 75 <then> | 72 <then> |
| 76 <echo level="info"> | 73 <echo level="info"> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 98 verbosity="${verbosity}"> | 95 verbosity="${verbosity}"> |
| 99 <filter excludes="${emma.default.filter}"/> | 96 <filter excludes="${emma.default.filter}"/> |
| 100 <filter value="${emma.filter}"/> | 97 <filter value="${emma.filter}"/> |
| 101 </instr> | 98 </instr> |
| 102 </emma> | 99 </emma> |
| 103 </then> | 100 </then> |
| 104 </if> | 101 </if> |
| 105 <!-- | 102 <!-- |
| 106 If the project needs a test jar then generate a jar containing | 103 If the project needs a test jar then generate a jar containing |
| 107 all compiled classes and referenced jars. | 104 all compiled classes and referenced jars. |
| 105 project.is.testapp is set by Android's ant build system based on the |
| 106 target's manifest. It is true only for instrumentation apks. |
| 108 --> | 107 --> |
| 109 <if condition="${generate.test.jar}"> | 108 <if condition="${project.is.testapp}"> |
| 110 <then> | 109 <then> |
| 111 <echo level="info">Creating test jar file: | 110 <echo level="info">Creating test jar file: |
| 112 ${ant.project.name}-debug.jar</echo> | 111 ${ant.project.name}-debug.jar</echo> |
| 113 <property-location name="create.test.jar.file" | 112 <property-location name="create.test.jar.file" |
| 114 location="${CHROMIUM_SRC}/build/android/ant/create-test-jar.js"/> | 113 location="${CHROMIUM_SRC}/build/android/ant/create-test-jar.js"/> |
| 115 <script language="javascript" src="${create.test.jar.file}"/> | 114 <script language="javascript" src="${create.test.jar.file}"/> |
| 116 </then> | 115 </then> |
| 117 </if> | 116 </if> |
| 118 | 117 |
| 119 </do-only-if-manifest-hasCode> | 118 </do-only-if-manifest-hasCode> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 160 |
| 162 <!-- Zip aligns the APK --> | 161 <!-- Zip aligns the APK --> |
| 163 <zipalign-helper | 162 <zipalign-helper |
| 164 in.package="${out.unaligned.file}" | 163 in.package="${out.unaligned.file}" |
| 165 out.package="${out.final.file}" /> | 164 out.package="${out.final.file}" /> |
| 166 <echo level="info">Release Package: ${out.final.file}</echo> | 165 <echo level="info">Release Package: ${out.final.file}</echo> |
| 167 </sequential> | 166 </sequential> |
| 168 </do-only-if-not-library> | 167 </do-only-if-not-library> |
| 169 <record-build-info /> | 168 <record-build-info /> |
| 170 </target> | 169 </target> |
| 170 |
| 171 <path id="native.libs.gdbserver"> |
| 172 <fileset file="${android.gdbserver}"/> |
| 173 </path> |
| 174 |
| 175 <target name="-post-compile"> |
| 176 <!-- |
| 177 Copy gdbserver to main libs directory if building a non-instrumentation de
bug apk. |
| 178 TODO(jrg): For now, Chrome on Android always builds native code |
| 179 as Release and java/ant as Debug, which means we always install |
| 180 gdbserver. Resolve this discrepancy, possibly by making this |
| 181 Release Official build java/ant as Release. |
| 182 --> |
| 183 <if> |
| 184 <condition> |
| 185 <and> |
| 186 <equals arg1="${build.target}" arg2="debug"/> |
| 187 <isfalse value="${project.is.testapp}"/> |
| 188 </and> |
| 189 </condition> |
| 190 <then> |
| 191 <echo message="Copying gdbserver to the apk to enable native debugging"/
> |
| 192 <copy todir="${out.dir}/libs/${target.abi}"> |
| 193 <path refid="native.libs.gdbserver"/> |
| 194 </copy> |
| 195 </then> |
| 196 </if> |
| 197 |
| 198 <!-- Package all the compiled .class files into a .jar. --> |
| 199 <jar |
| 200 jarfile="${lib.java.dir}/chromium_${PACKAGE_NAME}.jar" |
| 201 basedir="${out.classes.absolute.dir}" |
| 202 /> |
| 203 </target> |
| 171 </project> | 204 </project> |
| OLD | NEW |