-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
91 lines (67 loc) · 1.97 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright © 2016 Andy Goryachev <andy@goryachev.com> -->
<project default="build-all" basedir=".">
<!-- project name -->
<property name="TARGET" value="ReqTraq"/>
<!-- libraries -->
<path id="libs">
<!--
<pathelement location="lib/bouncycastle/bcprov-jdk15on-150.jar" />
-->
</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
srcdir="src"
destdir="build/classes"
debug="true"
encoding="utf-8"
fork="true"
nowarn="true"
optimize="false"
source="1.8"
target="1.8"
includeantruntime="false"
>
<compilerarg value="-Xlint:none"/>
<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>
<!-- upack library jars -->
<target name="unpack-jars" depends="init">
<unzip dest="build/classes">
<path refid="libs" />
</unzip>
<delete dir="build/classes/META-INF" />
</target>
<!-- build app jar -->
<target name="make-jar" depends="compile, copy-resources, unpack-jars">
<delete file="build/jars/${TARGET}.jar" />
<jar
jarfile="build/jars/${TARGET}.jar"
basedir="build/classes"
filesonly="true"
manifest="config/${TARGET}.manifest"
>
</jar>
</target>
<!-- generate digest -->
<target name="sha-jar" depends="make-jar">
<checksum file="build/jars/${TARGET}.jar" algorithm="sha-256" forceoverwrite="yes" fileext=".sha256.txt" />
</target>
<!-- build all -->
<target name="build-all" depends="compile, copy-resources, make-jar, sha-jar" />
</project>