forked from liberborn/extapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
69 lines (62 loc) · 2.62 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
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="Extapp" default="build.jar" basedir=".">
<target name="clean" depends="-load.properties">
<delete dir="${build.dir}" quiet="true"/>
</target>
<target name="-load.properties">
<property file="ant.properties"/>
</target>
<target name="-init" depends="-load.properties">
<mkdir dir="${build.dir}"/>
</target>
<target name="build.classes" depends="-init">
<echo message="Using Java version ${ant.java.version}." />
<mkdir dir="${build.dir}/classes"/>
<javac srcdir="${src.dir}"
destdir="${build.dir}/classes"
includes="**/*.java"
deprecation="off"
debug="on"
source="1.7"
executable="${env.JAVA_HOME}/bin/javac"
includeantruntime="false">
<classpath>
<pathelement location="${lib.dir}/commons-io-2.4.jar"/>
<pathelement location="${lib.dir}/gson-2.2.2.jar"/>
<pathelement location="${lib.dir}/jargs-1.0.jar"/>
</classpath>
</javac>
</target>
<target name="build.jar" depends="build.classes">
<mkdir dir="${build.dir}/jar"/>
<unjar src="${lib.dir}/commons-io-2.4.jar" dest="${build.dir}/jar"/>
<unjar src="${lib.dir}/gson-2.2.2.jar" dest="${build.dir}/jar"/>
<unjar src="${lib.dir}/jargs-1.0.jar" dest="${build.dir}/jar"/>
<copy todir="${build.dir}/jar">
<fileset dir="${build.dir}/classes" includes="**/*.class"/>
</copy>
<jar destfile="${build.dir}/${jar.name}" basedir="${build.dir}/jar">
<manifest>
<attribute name="Main-Class" value="net.prime.extapp.ExtappMain"/>
</manifest>
</jar>
</target>
<target name="build.dist.package" depends="build.jar">
<mkdir dir="${build.dir}/${dist.package.name}"/>
<mkdir dir="${build.dir}/${dist.package.name}/build"/>
<copy file="${build.dir}/${jar.name}" todir="${build.dir}/${dist.package.name}/build"/>
<copy todir="${build.dir}/${dist.package.name}">
<fileset dir=".">
<include name="ant.properties"/>
<include name="build.xml"/>
<include name="doc/**/*"/>
<include name="lib/**/*"/>
<include name="src/**/*"/>
<exclude name="**/.git"/>
</fileset>
</copy>
<zip destfile="${build.dir}/${dist.package.name}.zip"
basedir="${build.dir}"
includes="${dist.package.name}/**/*"/>
</target>
</project>