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

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
Index: build/android/ant/sdk-targets.xml
diff --git a/build/android/ant/sdk-targets.xml b/build/android/ant/sdk-targets.xml
index 6707b08a484aab454595d2ad55ab844fc2fc7c96..dea0434fdb05ed58d3a2500f76fb201a13d3248e 100644
--- a/build/android/ant/sdk-targets.xml
+++ b/build/android/ant/sdk-targets.xml
@@ -95,7 +95,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}">
<then>
<echo level="info">Creating test jar file:
${ant.project.name}-debug.jar</echo>
@@ -157,4 +157,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 not-test 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}"/>
shashi 2012/09/21 01:53:55 It may be cleaner to use a different property, lik
Yaron 2012/09/21 01:57:01 Where is this ever set?
cjhopman 2012/09/28 01:14:25 This is set by Android's build.xml based upon the
cjhopman 2012/09/28 01:14:25 A testapp should only be testing against the java
+ </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>

Powered by Google App Engine
This is Rietveld 408576698