This repository has been archived by the owner on Apr 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 574
/
build.xml
92 lines (83 loc) · 3.06 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<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>