-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
106 lines (106 loc) · 3.95 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="dist" name="Fluenta">
<property name="target" value="17" />
<property name="source" value="17" />
<property name="build.compiler" value="javac10+" />
<path id="Fluenta.classpath">
<pathelement location="jars/dtd.jar" />
<pathelement location="jars/h2-1.4.200.jar" />
<pathelement location="jars/json.jar" />
<pathelement location="jars/jsoup.jar" />
<pathelement location="jars/mapdb.jar" />
<pathelement location="jars/openxliff.jar" />
<pathelement location="jars/swordfish.jar" />
<pathelement location="jars/xmljava.jar" />
<pathelement location="jars/swt.jar" />
</path>
<condition property="isWindows">
<os family="windows" />
</condition>
<target name="init">
<mkdir dir="out" />
<copy includeemptydirs="false" todir="out">
<fileset dir="src">
<exclude name="**/*.java" />
<exclude name="**/*.xcf" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="out" />
<delete dir="bin" />
<delete dir="conf" />
<delete dir="include" />
<delete dir="legal" />
<delete dir="lib" />
</target>
<target name="compile" depends="clean,init">
<description>Build jar file</description>
<delete file="jars/fluenta.jar" failonerror="false" />
<javac srcdir="src" destdir="out" classpathref="Fluenta.classpath" modulepathref="Fluenta.classpath" includeAntRuntime="false" />
<jar destfile="jars/fluenta.jar" basedir="out" />
</target>
<target name="distclean">
<delete dir="dist" failonerror="false" />
<delete dir="bin" failonerror="false" />
<delete dir="conf" failonerror="false" />
<delete dir="include" failonerror="false" />
<delete dir="legal" failonerror="false" />
<delete dir="lib" failonerror="false" />
<delete file="release" />
</target>
<target name="copyWindows" if="isWindows">
<description>Move java binaries to work folder</description>
<move todir=".\bin">
<fileset dir="dist\bin" />
</move>
<move todir=".\conf">
<fileset dir="dist\conf" />
</move>
<move todir=".\include">
<fileset dir="dist\include" />
</move>
<move todir=".\legal">
<fileset dir="dist\legal" />
</move>
<move todir=".\lib">
<fileset dir="dist\lib" />
</move>
<move file="dist\release" todir="." />
<delete dir="dist" failonerror="true" />
<delete file=".\jars\fluenta.jar" />
<copy file=".\jars\h2-1.4.200.jar" todir="lib" />
</target>
<target name="copyUnix" unless="isWindows">
<description>Move java binaries to work folder</description>
<move todir="./bin">
<fileset dir="dist/bin" />
</move>
<move todir="./conf">
<fileset dir="dist/conf" />
</move>
<move todir="./include">
<fileset dir="dist/include" />
</move>
<move todir="./legal">
<fileset dir="dist/legal" />
</move>
<move todir="./lib">
<fileset dir="dist/lib" />
</move>
<move file="dist/release" todir="." />
<delete dir="dist" failonerror="false" />
<delete file="jars/fluenta.jar" />
<copy file="jars/h2-1.4.200.jar" todir="lib" />
</target>
<target name="link" depends="distclean,compile">
<description>Build Java binaries</description>
<link destDir="dist" modulepath="jars:${java.home}/jmods">
<module name="fluenta" />
</link>
<delete file="dist/lib/jrt-fs.jar" />
</target>
<target name="dist" depends="link,copyWindows,copyUnix">
<description>Prepare distribution</description>
</target>
</project>