-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
96 lines (81 loc) · 2.94 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
<project name="CurlyWhirly" default="compile" basedir=".">
<property file="build.properties" />
<property name="src" location="src"/>
<property name="res" location="res"/>
<property name="lib" location="lib"/>
<property name="dat" location="data"/>
<property name="cls" location="classes"/>
<property name="jar" value="${lib}/curlywhirly.jar"/>
<target name="init">
<mkdir dir="${cls}"/>
</target>
<!-- Development classpath -->
<path id="project.classpath">
<fileset dir="${lib}"/>
</path>
<!-- Runtime classpath (manifest formatted) -->
<manifestclasspath property="jar.classpath" jarfile="${jar}">
<classpath>
<fileset dir="${lib}">
<exclude name="**/lib-devel/**"/>
</fileset>
</classpath>
</manifestclasspath>
<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${cls}" source="11" target="11" debug="true" includeantruntime="false">
<classpath refid="project.classpath"/>
</javac>
</target>
<target name="clean" depends="init">
<delete includeemptydirs="true">
<fileset dir="${cls}" includes="**/*"/>
<fileset file="${jar}"/>
</delete>
</target>
<target name="jar" depends="clean, compile">
<condition property="i4j.version" value="x.xx.xx.xx">
<equals arg1="${i4j.version}" arg2="${i4j.version}"/>
</condition>
<jar jarfile="${jar}">
<zipfileset dir="${res}" prefix="res"/>
<zipfileset dir="installer/licence" prefix="installer/licence"/>
<zipfileset dir="${dat}" prefix="data">
<include name="randomData.txt"/>
</zipfileset>
<fileset dir="${cls}">
<exclude name="**/*Test.class"/>
</fileset>
<manifest>
<attribute name="Main-Class" value="jhi.curlywhirly.gui.CurlyWhirly"/>
<attribute name="Class-Path" value="${jar.classpath}"/>
<attribute name="Implementation-Version" value="${i4j.version}"/>
</manifest>
</jar>
</target>
<target name="getversion">
<input message="Enter the version number:" addproperty="i4j.version"/>
</target>
<target name="install4j" depends="getversion, jar">
<taskdef name="install4j"
classname="com.install4j.Install4JTask"
classpath="${install4j.antpath}"/>
<delete>
<fileset dir="installer" includes="**/*.exe"/>
<fileset dir="installer" includes="**/*.sh"/>
<fileset dir="installer" includes="**/*.dmg"/>
</delete>
<install4j projectfile="installer/curlywhirly.install4j"
release="${i4j.version}"
winKeystorePassword="${keystore.password}"
macKeystorePassword="${keystore.password}"/>
</target>
<target name="test" depends="compile">
<junit printsummary="on" haltonerror="true" haltonfailure="true" dir="." fork="true">
<classpath refid="project.classpath"/>
<formatter type="plain" usefile="false"/>
<batchtest>
<fileset dir="${cls}" includes="**/*Test.class"/>
</batchtest>
</junit>
</target>
</project>