Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
216 lines (200 sloc) 6.5 KB
<project name="asmack" default="compile" basedir=".">
<property file="local.properties" />
<property name="jar.suffix" value="" />
<property name="build.all" value="false" />
<condition property="build-1.1">
<available file="${sdk-location}/platforms/android-1.1/android.jar" />
</condition>
<condition property="build-1.5">
<and>
<istrue value="${build.all}" />
<available file="${sdk-location}/platforms/android-1.5/android.jar" />
</and>
</condition>
<condition property="build-1.6">
<and>
<istrue value="${build.all}" />
<available file="${sdk-location}/platforms/android-1.6/android.jar" />
</and>
</condition>
<condition property="build-2.0">
<and>
<istrue value="${build.all}" />
<available file="${sdk-location}/platforms/android-2.0/android.jar" />
</and>
</condition>
<condition property="build-2.0.1">
<and>
<istrue value="${build.all}" />
<available file="${sdk-location}/platforms/android-2.0.1/android.jar" />
</and>
</condition>
<target name="compile-jse" description="Compile for java se">
<delete dir="build/classes" failonerror="false" />
<mkdir dir="build/classes" />
<mkdir dir="build/classes/trunk" />
<javac
target="1.5"
srcdir="build/src/trunk"
destdir="build/classes/trunk"
classpath="lib/xmlpull_1_1_3_4c.jar:lib/httpclient-4.0.jar:lib/httpcore-4.0.1.jar"
debug="true"
debuglevel="source,lines"
excludes="**/de/measite/smack/AndroidDebugger.java"
/>
<copy todir="build/classes/trunk"><fileset dir="build/src/trunk" includes="META-INF/**" /></copy>
<jar
basedir="build/classes/trunk"
destfile="build/asmack-jse${jar.suffix}.jar"
filesonly="true"
level="9"
/>
<zip
basedir="build/src/trunk"
destfile="build/asmack-jse-source${jar.suffix}.zip"
excludes="**/de/measite/smack/AndroidDebugger.java"
filesonly="true"
level="9"
/>
</target>
<target name="compile-a201" description="Compile for android 2.0.1" if="build-2.0.1">
<delete dir="build/classes" failonerror="false" />
<mkdir dir="build/classes" />
<mkdir dir="build/classes/trunk" />
<javac
target="1.5"
srcdir="build/src/trunk"
destdir="build/classes/trunk"
classpath="lib/xmlpull_1_1_3_4c.jar"
bootclasspath="${sdk-location}/platforms/android-2.0.1/android.jar"
debug="true"
debuglevel="source,lines"
/>
<copy todir="build/classes/trunk"><fileset dir="build/src/trunk" includes="META-INF/**" /></copy>
<jar
basedir="build/classes/trunk"
destfile="build/asmack-android-2.0.1${jar.suffix}.jar"
filesonly="true"
level="9"
/>
<zip
basedir="build/src/trunk"
destfile="build/asmack-android-2.0.1-source${jar.suffix}.zip"
filesonly="true"
level="9"
/>
</target>
<target name="compile-a20" description="Compile for android 2.0" if="build-2.0">
<delete dir="build/classes" failonerror="false" />
<mkdir dir="build/classes" />
<mkdir dir="build/classes/trunk" />
<javac
target="1.5"
srcdir="build/src/trunk"
destdir="build/classes/trunk"
classpath="lib/xmlpull_1_1_3_4c.jar"
bootclasspath="${sdk-location}/platforms/android-2.0/android.jar"
debug="true"
debuglevel="source,lines"
/>
<copy todir="build/classes/trunk"><fileset dir="build/src/trunk" includes="META-INF/**" /></copy>
<jar
basedir="build/classes/trunk"
destfile="build/asmack-android-2.0${jar.suffix}.jar"
filesonly="true"
level="9"
/>
<zip
basedir="build/src/trunk"
destfile="build/asmack-android-2.0-source${jar.suffix}.zip"
filesonly="true"
level="9"
/>
</target>
<target name="compile-a16" description="Compile for android 1.6" if="build-1.6">
<delete dir="build/classes" failonerror="false" />
<mkdir dir="build/classes" />
<mkdir dir="build/classes/trunk" />
<javac
target="1.5"
srcdir="build/src/trunk"
destdir="build/classes/trunk"
classpath="lib/xmlpull_1_1_3_4c.jar"
bootclasspath="${sdk-location}/platforms/android-1.6/android.jar"
debug="true"
debuglevel="source,lines"
/>
<copy todir="build/classes/trunk"><fileset dir="build/src/trunk" includes="META-INF/**" /></copy>
<jar
basedir="build/classes/trunk"
destfile="build/asmack-android-1.6${jar.suffix}.jar"
filesonly="true"
level="9"
/>
<zip
basedir="build/src/trunk"
destfile="build/asmack-android-1.6-source${jar.suffix}.zip"
filesonly="true"
level="9"
/>
</target>
<target name="compile-a15" description="Compile for android 1.5" if="build-1.5">
<delete dir="build/classes" failonerror="false" />
<mkdir dir="build/classes" />
<mkdir dir="build/classes/trunk" />
<javac
target="1.5"
srcdir="build/src/trunk"
destdir="build/classes/trunk"
classpath="lib/xmlpull_1_1_3_4c.jar"
bootclasspath="${sdk-location}/platforms/android-1.5/android.jar"
debug="true"
debuglevel="source,lines"
/>
<copy todir="build/classes/trunk"><fileset dir="build/src/trunk" includes="META-INF/**" /></copy>
<jar
basedir="build/classes/trunk"
destfile="build/asmack-android-1.5${jar.suffix}.jar"
filesonly="true"
level="9"
/>
<zip
basedir="build/src/trunk"
destfile="build/asmack-android-1.5-source${jar.suffix}.zip"
filesonly="true"
level="9"
/>
</target>
<target name="compile-a11" description="Compile for android 1.1" if="build-1.1">
<delete dir="build/classes" failonerror="false" />
<mkdir dir="build/classes" />
<mkdir dir="build/classes/trunk" />
<javac
target="1.5"
srcdir="build/src/trunk"
destdir="build/classes/trunk"
classpath="lib/xmlpull_1_1_3_4c.jar"
bootclasspath="${sdk-location}/platforms/android-1.1/android.jar"
debug="true"
debuglevel="source,lines"
/>
<copy todir="build/classes/trunk"><fileset dir="build/src/trunk" includes="META-INF/**" /></copy>
<jar
basedir="build/classes/trunk"
destfile="build/asmack-android-1.1${jar.suffix}.jar"
filesonly="true"
level="9"
/>
<zip
basedir="build/src/trunk"
destfile="build/asmack-android-1.1-source${jar.suffix}.zip"
filesonly="true"
level="9"
/>
</target>
<target
name="compile"
description="Compile for all targets"
depends="compile-jse,compile-a201,compile-a20,compile-a16,compile-a15,compile-a11"
/>
</project>