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> |