Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
93 lines (83 sloc) 3.06 KB
<project name="asmack" default="compile" basedir=".">
<property name="jar.suffix" value="" />
<property name="jingle" value="" />
<property file="local.properties" />
<property name="android.version" value="" />
<!-- if sdk-location was not set from one of the property file, then
get it from the ANDROID_HOME env var.
This must be done before we load project.properties since
the proguard config can use sdk.dir -->
<property environment="env" />
<condition property="sdk-location" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME" />
</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="7"
source="7"
srcdir="build/src/trunk"
destdir="build/classes/trunk"
classpath="lib/xpp3-1.1.4c.jar:lib/httpclient-4.1.3.jar:lib/httpcore-4.1.4.jar"
debug="true"
debuglevel="source,lines"
excludes="**/de/measite/smack/AndroidDebugger.java"
includeantruntime="false"
/>
<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="check-android-exists" >
<available property="android.exists" file="${sdk-location}/platforms/${android.version}/android.jar" />
<fail unless="${android.exists}" message="Android version ${android.version} does not is not available : ${sdk-location}/platforms/${android.version}/android.jar is not found" />
</target>
<target name="compile-android" description="Compile for android" depends="check-android-exists" >
<delete dir="build/classes/${android.version}" failonerror="false" />
<mkdir dir="build/classes/${android.version}" />
<javac
target="7"
source="7"
srcdir="build/src"
destdir="build/classes/${android.version}"
bootclasspath="${sdk-location}/platforms/${android.version}/android.jar:lib/org.xbill.dns_2.1.6.jar:lib/jxmpp-core-0.1.0.jar:lib/jxmpp-util-cache-0.1.0.jar:lib/minidns-0.1.1.jar:${jingle}"
debug="true"
debuglevel="source,lines"
includeantruntime="false"
/>
<copy todir="build/classes/${android.version}">
<fileset dir="build/resources" />
</copy>
<jar
basedir="build/classes/${android.version}"
destfile="build/asmack-${android.version}${jar.suffix}.jar"
filesonly="true"
level="9"
/>
<zip
destfile="build/asmack-${android.version}-source${jar.suffix}.zip"
filesonly="true"
level="9">
<fileset dir="build/src"/>
<fileset dir="build/resources"/>
</zip>
</target>
<target
name="compile"
description="Compile for jse targets"
depends="compile-jse"
/>
</project>