-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.xml
101 lines (80 loc) · 2.55 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright © 2016-2024 Andy Goryachev <[email protected]> -->
<project default="build-all" basedir=".">
<!-- libraries -->
<path id="libs">
</path>
<target name="clean">
<delete includeEmptyDirs="true" dir="build" failonerror="false" />
</target>
<target name="init" depends="clean">
<mkdir dir="build" />
<mkdir dir="build/classes" />
<mkdir dir="build/jars" />
</target>
<target name="compile" depends="init">
<javac
destdir="build/classes"
debug="true"
encoding="utf-8"
fork="true"
nowarn="true"
optimize="false"
source="21"
target="21"
includeantruntime="false"
>
<compilerarg value="-Xlint:none"/>
<src path="src" />
<classpath refid="libs" />
</javac>
</target>
<!-- copy non-java resources -->
<target name="copy-resources" depends="init">
<copy todir="build/classes">
<fileset dir="src" excludes="**/*.java" />
</copy>
</target>
<!-- build demo jar -->
<target name="make-jar" depends="compile, copy-resources">
<delete file="build/jars/FxDockDemo.jar" />
<jar
jarfile="build/jars/FxDockDemo.jar"
basedir="build/classes"
filesonly="true"
>
<manifest>
<attribute name="Main-Class" value="demo.dock.DockDemoApp" />
<attribute name="Created-By" value="[email protected]" />
</manifest>
</jar>
</target>
<!-- build lib jar -->
<target name="make-lib-jar" depends="compile, copy-resources">
<delete file="build/jars/FxDock.jar" />
<jar
jarfile="build/jars/FxDock.jar"
basedir="build/classes"
filesonly="true"
excludes="demo/**"
>
<manifest>
<attribute name="Created-By" value="[email protected]" />
</manifest>
</jar>
</target>
<!-- generate digest -->
<target name="sha-jar" depends="make-jar">
<checksum file="build/jars/FxDockDemo.jar" algorithm="sha-256" forceoverwrite="yes" fileext=".sha256.txt" />
<checksum file="build/jars/FxDock.jar" algorithm="sha-256" forceoverwrite="yes" fileext=".sha256.txt" />
</target>
<!-- copy jars to dist -->
<target name="copy-jar" depends="make-jar">
<copy file="build/jars/FxDockDemo.jar" todir="dist" />
<copy file="build/jars/FxDockDemo.jar.sha256.txt" todir="dist" />
<copy file="build/jars/FxDock.jar" todir="dist" />
<copy file="build/jars/FxDock.jar.sha256.txt" todir="dist" />
</target>
<!-- build all -->
<target name="build-all" depends="compile, copy-resources, make-jar, make-lib-jar, sha-jar, copy-jar" />
</project>