Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3309)

Unified Diff: build/android/ant/sdk-targets.xml

Issue 10959034: Make apks build from a single ant .xml template (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/ant/chromium-apk.xml ('k') | build/java.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/ant/sdk-targets.xml
diff --git a/build/android/ant/sdk-targets.xml b/build/android/ant/sdk-targets.xml
index 7909daa32a78d7e2f5dbe62c7632f293688f81be..497928d0435f67b4f66e013de90b6886822e44f8 100644
--- a/build/android/ant/sdk-targets.xml
+++ b/build/android/ant/sdk-targets.xml
@@ -34,20 +34,20 @@
name="-compile"
depends="-build-setup, -pre-build, -code-gen, -pre-compile">
<do-only-if-manifest-hasCode elseText="hasCode = false. Skipping..." >
- <!-- If souce path is not set, then use the default value -->
+ <!-- If javac.srcdirs.additional isn't set, set it to an empty path. -->
<if>
- <condition>
- <not>
- <isreference refid="javac.custom.sourcepath"/>
- </not>
- </condition>
- <then>
- <path id="javac.custom.sourcepath">
- <pathelement path="${source.absolute.dir}"/>
- <pathelement path="${gen.absolute.dir}"/>
- </path>
- </then>
- </if>
+ <condition>
+ <not>
+ <isreference refid="javac.srcdirs.additional"/>
+ </not>
+ </condition>
+ <then>
+ <path id="javac.srcdirs.additional">
+ <pathelement path="${source.absolute.dir}"/>
+ <pathelement path="${gen.absolute.dir}"/>
+ </path>
+ </then>
+ </if>
<javac
bootclasspathref="project.target.class.path"
classpathref="javac.custom.classpath"
@@ -63,7 +63,7 @@
<src path="${source.absolute.dir}"/>
<src path="${gen.absolute.dir}"/>
<src>
- <path refid="javac.custom.sourcepath"/>
+ <path refid="javac.srcdirs.additional"/>
</src>
<compilerarg line="${java.compilerargs}"/>
</javac>
@@ -106,7 +106,7 @@
If the project needs a test jar then generate a jar containing
all compiled classes and referenced jars.
-->
- <if condition="${generate.test.jar}">
+ <if condition="${project.is.testapp}">
Yaron 2012/09/28 17:51:23 Please add a comment about where this is set becau
cjhopman 2012/09/28 18:13:58 Done.
<then>
<echo level="info">Creating test jar file:
${ant.project.name}-debug.jar</echo>
@@ -168,4 +168,38 @@
</do-only-if-not-library>
<record-build-info />
</target>
+
+ <path id="native.libs.gdbserver">
+ <fileset file="${android.gdbserver}"/>
+ </path>
+
+ <target name="-post-compile">
+ <!--
+ Copy gdbserver to main libs directory if building a non-instrumentation debug apk.
+ TODO(jrg): For now, Chrome on Android always builds native code
+ as Release and java/ant as Debug, which means we always install
+ gdbserver. Resolve this discrepancy, possibly by making this
+ Release Official build java/ant as Release.
+ -->
+ <if>
+ <condition>
+ <and>
+ <equals arg1="${build.target}" arg2="debug"/>
+ <isfalse value="${project.is.testapp}"/>
+ </and>
+ </condition>
+ <then>
+ <echo message="Copying gdbserver to the apk to enable native debugging"/>
+ <copy todir="${out.dir}/libs/${target.abi}">
+ <path refid="native.libs.gdbserver"/>
+ </copy>
+ </then>
+ </if>
+
+ <!-- Package all the compiled .class files into a .jar. -->
+ <jar
+ jarfile="${lib.java.dir}/chromium_${PACKAGE_NAME}.jar"
+ basedir="${out.classes.absolute.dir}"
+ />
+ </target>
</project>
« no previous file with comments | « build/android/ant/chromium-apk.xml ('k') | build/java.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698