1 <project name="asmack" default="compile" basedir="."> 2 3 <property name="jar.suffix" value="" /> 4 <property name="jingle" value="" /> 5 <property file="local.properties" /> 6 <property name="android.version" value="" /> 7 <target name="compile-jse" description="Compile for java se"> 8 <delete dir="build/classes" failonerror="false" /> 9 <mkdir dir="build/classes" /> 10 <mkdir dir="build/classes/trunk" /> 11 <javac 12 target="6" 13 source="6" 14 srcdir="build/src/trunk" 15 destdir="build/classes/trunk" 16 classpath="lib/xpp3-1.1.4c.jar:lib/httpclient-4.1.3.jar:lib/httpcore-4.1.4.jar" 17 debug="true" 18 debuglevel="source,lines" 19 excludes="**/de/measite/smack/AndroidDebugger.java" 20 /> 21 <copy todir="build/classes/trunk"><fileset dir="build/src/trunk" includes="META-INF/**" /></copy> 22 <jar 23 basedir="build/classes/trunk" 24 destfile="build/asmack-jse${jar.suffix}.jar" 25 filesonly="true" 26 level="9" 27 /> 28 <zip 29 basedir="build/src/trunk" 30 destfile="build/asmack-jse-source${jar.suffix}.zip" 31 excludes="**/de/measite/smack/AndroidDebugger.java" 32 filesonly="true" 33 level="9" 34 /> 35 </target> 36 37 <target name="check-android-exists" > 38 <available property="android.exists" file="${sdk-location}/platforms/${android.version}/android.jar" /> 39 <fail unless="${android.exists}" message="Android version ${android.version} does not is not available : ${sdk-location}/platforms/${android.version}/android.jar is not found" /> 40 </target> 41 42 <target name="compile-android" description="Compile for android" depends="check-android-exists" > 43 <delete dir="build/classes/${android.version}" failonerror="false" /> 44 <mkdir dir="build/classes/${android.version}" /> 45 <mkdir dir="build/classes/${android.version}/trunk" /> 46 <javac 47 target="6" 48 source="6" 49 srcdir="build/src/trunk" 50 destdir="build/classes/${android.version}/trunk" 51 bootclasspath="${sdk-location}/platforms/${android.version}/android.jar:${jingle}" 52 debug="true" 53 debuglevel="source,lines" 54 /> 55 <copy todir="build/classes/${android.version}/trunk"> 56 <fileset dir="build/src/trunk" includes="META-INF/**" /> 57 </copy> 58 <jar 59 basedir="build/classes/${android.version}/trunk" 60 destfile="build/asmack-${android.version}${jar.suffix}.jar" 61 filesonly="true" 62 level="9" 63 /> 64 <zip 65 basedir="build/src/trunk" 66 destfile="build/asmack-${android.version}-source${jar.suffix}.zip" 67 filesonly="true" 68 level="9" 69 /> 70 </target> 71 72 73 <target 74 name="compile" 75 description="Compile for jse targets" 76 depends="compile-jse" 77 /> 78 79 </project> 80 81