forked from interdroid/smartsockets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
144 lines (110 loc) · 5.23 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<project name="SmartSockets" default="build" basedir=".">
<property name="version" value="-1.60" />
<property name="jar" value="smartsockets${version}.jar" />
<property name="testjar" value="smartsockets-tests${version}.jar" />
<property name="jar-android" value="smartsockets${version}-android.jar" />
<property name="zip" value="smartsockets${version}.zip" />
<property name="src-zip" value="smartsockets${version}-src.zip" />
<property name="srcdir" value="./src" />
<property name="srcdir-android" value="./src-android" />
<property name="builddir" value="./build" />
<property name="distdir" value="./lib" />
<property name="javadoc" value="javadoc/smartsockets" />
<path id="android.classpath">
<fileset dir="external">
<include name="*.jar" />
</fileset>
<fileset dir="lib">
<include name="*.jar" />
</fileset>
</path>
<target name="copy">
<mkdir dir="${distdir}" />
<copy todir="${distdir}">
<fileset dir="external" />
</copy>
</target>
<path id="default.classpath">
<fileset dir="external">
<include name="*.jar" />
</fileset>
<fileset dir="lib">
<include name="*.jar" />
</fileset>
</path>
<!-- Compile smartsockets tests -->
<target name="compile-test">
<delete dir="${builddir}" />
<mkdir dir="${distdir}" />
<mkdir dir="${builddir}" />
<javac destdir="${builddir}" srcdir="${srcdir}" target="1.5" debug="true" includes="test/**/*.java" classpathref="default.classpath" />
<jar jarfile="${distdir}/${testjar}" basedir="${builddir}" includes="**">
<manifest>
<attribute name="Built-By" value="${user.name}" />
</manifest>
</jar>
</target>
<!-- Compile smartsockets -->
<target name="compile">
<delete dir="${builddir}" />
<mkdir dir="${distdir}" />
<mkdir dir="${builddir}" />
<javac destdir="${builddir}" srcdir="${srcdir}" target="1.5" debug="true" includes="ibis/**/*.java" classpathref="default.classpath" />
<jar jarfile="${distdir}/${jar}" basedir="${builddir}" includes="**">
<manifest>
<attribute name="Built-By" value="${user.name}" />
</manifest>
</jar>
</target>
<!-- Compile smartsockets for android-->
<target name="compile-android">
<delete dir="${builddir}" />
<mkdir dir="${distdir}" />
<mkdir dir="${builddir}" />
<javac destdir="${builddir}" srcdir="${srcdir}" target="1.5" debug="true" includes="ibis/**/*.java" excludes="ibis/smartsockets/viz/**" classpathref="default.classpath" />
<javac destdir="${builddir}" srcdir="${srcdir-android}" target="1.5" debug="true" includes="**/*.java" classpathref="android.classpath" />
<jar jarfile="${distdir}/${jar-android}" basedir="${builddir}" includes="**">
<manifest>
<attribute name="Built-By" value="${user.name}" />
</manifest>
</jar>
</target>
<target name="javadoc" description="Create javadocs">
<!-- Create the javadoc -->
<mkdir dir="${javadoc}" />
<javadoc destdir="${javadoc}" access="public" sourcepath="src" windowtitle="SmartSockets Documentation" packagenames="ibis.smartsockets.*" doctitle="SmartSockets 1.0 Documentation" bottom="SmartSockets 1.60" classpathref="default.classpath">
<link href="http://download.oracle.com/javase/1.5.0/docs/api/" />
</javadoc>
</target>
<target name="build-tests" depends="build,compile-test">
</target>
<target name="build" depends="clean,copy,compile,javadoc">
</target>
<target name="build-android" depends="clean,copy,compile-android,javadoc">
</target>
<target name="bin.zip" depends="build">
<delete failonerror="false" file="${zip}" />
<zip destfile="${zip}">
<zipfileset dir="." prefix="smartsockets-${version}" includes="external/**,lib/**,*.properties,*.example,notices/**,README.txt,INSTALL.txt,LICENSE.txt,javadoc/**" />
<zipfileset dir="." prefix="smartsockets-${version}" filemode="755" includes="bin/**" />
</zip>
</target>
<target name="src.zip" depends="build">
<delete failonerror="false" file="${src-zip}" />
<zip destfile="${src-zip}">
<zipfileset dir="." prefix="smartsockets-${version}" includes="src/**,external/**,lib/**,*.properties,*.example,notices/**,README.txt,INSTALL.txt,LICENSE.txt,javadoc/**,build.xml" />
<zipfileset dir="." prefix="smartsockets-${version}" filemode="755" includes="bin/**" />
</zip>
</target>
<!-- remove all generated code -->
<target name="clean" description="Removes the ${distdir} directory">
<delete failonerror="false" dir="${builddir}" />
<delete failonerror="false" dir="${distdir}" />
<delete failonerror="false" dir="${javadoc}" />
</target>
<target name="distclean" depends="clean">
<delete failonerror="false" dir="./build-eclipse" />
<delete failonerror="false" file="${zip}" />
<delete failonerror="false" file="${src-zip}" />
</target>
</project>