-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.xml
More file actions
45 lines (39 loc) · 1.48 KB
/
build.xml
File metadata and controls
45 lines (39 loc) · 1.48 KB
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
<?xml version="1.0" ?>
<project name="LayerUtil">
<target name="build-env">
<mkdir dir="build" />
<mkdir dir="build/classes" />
<available property="has-buildinfo" file="build/classes/buildinfo" />
</target>
<target name="buildinfo" depends="build-env" unless="has-buildinfo">
<exec executable="git" outputproperty="gitrev" failifexecutionfails="false">
<arg line="rev-parse HEAD" />
</exec>
</target>
<target name="build" depends="build-env">
<javac srcdir="src" destdir="build/classes" debug="on"
source="1.8" target="1.8" includeantruntime="no">
<compilerarg value="-Xlint:unchecked" />
<compilerarg value="-Xlint:-options" />
<classpath>
<pathelement path="lib/gson-2.8.6.jar" />
</classpath>
</javac>
<copy todir="build">
<fileset dir="lib/"><include name="*.jar" /></fileset>
</copy>
</target>
<target name="jar" depends="build,buildinfo">
<jar destfile="build/LayerUtil.jar" update="true">
<fileset dir="build/classes" />
<manifest>
<attribute name="Main-Class" value="LayerUtil" />
<attribute name="Class-Path" value="./../lib/gson-2.8.6.jar" />
</manifest>
</jar>
<chmod file="build/LayerUtil.jar" perm="a+x" />
</target>
<target name="clean">
<delete dir="build" />
</target>
</project>