-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
59 lines (51 loc) · 1.77 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="SwtCallback" default="jar" basedir=".">
<property name="src" location="src"/>
<property name="bin" location="bin"/>
<property name="build" location="build"/>
<property name="lib" location="lib"/>
<property name="res" location="res"/>
<property name="dist" location="dist"/>
<property name="version" value="0.4"/>
<property name="jarfile" location="${dist}/lib/SwtCallback.jar"/>
<fileset id="lib.jars" dir="${lib}">
<include name="**/*.jar"/>
</fileset>
<path id="lib.path">
<fileset refid="lib.jars"/>
</path>
<target name="compile" description="Compile code">
<mkdir dir="${bin}"/>
<javac srcdir="${src}" destdir="${bin}" includeAntRuntime="no"
classpathref="lib.path" source="1.5" excludes="**/*Test.java">
</javac>
</target>
<target name="jar" depends="compile"
description="Build SwtCallback jar">
<mkdir dir="${dist}"/>
<mkdir dir="${dist}/lib"/>
<jar jarfile="${jarfile}" compress="no" basedir="${bin}" excludes="**/*Test.class">
</jar>
</target>
<target name="binsrc-release" depends="clean, jar"
description="Build the binary and source release.">
<copy todir="${dist}/src">
<fileset dir="${src}" />
</copy>
<copy todir="${dist}/">
<fileset file="README.md" />
</copy>
<copy todir="${dist}/">
<fileset file="build.xml" />
</copy>
<tar longfile="gnu" destfile="${dist}/swtcallback-${version}.tar">
<tarfileset dir="${dist}" mode="755" prefix="swtcallback-${version}"/>
</tar>
<gzip src="${dist}/swtcallback-${version}.tar" destfile="${dist}/swtcallback-${version}.tar.gz"/>
</target>
<target name="clean" description="Remove build and dist directories">
<delete dir="${bin}"/>
<delete dir="${dist}"/>
<delete dir="${build}"/>
</target>
</project>