-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
93 lines (70 loc) · 2.02 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright © 2016-2023 Andy Goryachev <[email protected]> -->
<!--
To change the build for another application:
1. rename first two properties in this file
-->
<project>
<property name="TARGET" value="RNotebook"/>
<property name="MAIN" value="goryachev.notebook.RNotebookApp"/>
<property name="DEBUG" value="false" />
<property name="SRC" value="src"/>
<property name="LIB" value="lib/jars"/>
<property name="WORK" value="build/out"/>
<property name="OUT" value="${WORK}/classes"/>
<property name="LIB_EXT" value="${WORK}/lib"/>
<property name="JAR" value="build/jar/${TARGET}.jar"/>
<path id="lib.classpath">
<fileset dir="${LIB}">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="all" depends="clean,compile,copyresources,target,copyjar" />
<target name="clean">
<delete dir="${OUT}" />
<delete dir="${LIB_EXT}" />
</target>
<target name="compile">
<mkdir dir="${OUT}"/>
<javac srcdir="${SRC}" destdir="${OUT}" debug="${DEBUG}" encoding="utf-8" target="1.6" source="1.6">
<classpath refid="lib.classpath" />
<exclude name="test/**/*" />
</javac>
</target>
<target name="unjar_libs" depends="clean">
<mkdir dir="${LIB_EXT}"/>
<unzip dest="${LIB_EXT}">
<fileset dir="${LIB}">
<include name="**/*.jar" />
</fileset>
<patternset>
<exclude name="META-INF/**/*"/>
</patternset>
</unzip>
</target>
<target name="copyresources" depends="unjar_libs">
<copy todir="${OUT}">
<fileset dir="${SRC}">
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy todir="${OUT}">
<fileset dir="${LIB_EXT}" />
</copy>
</target>
<target name="target">
<mkdir dir="${WORK}"/>
<mkdir dir="build/jar" />
<delete file="${JAR}" />
<jar destfile="${JAR}">
<manifest>
<attribute name="Main-Class" value="${MAIN}"/>
</manifest>
<fileset dir="${OUT}">
</fileset>
</jar>
</target>
<target name="copyjar" depends="target">
<copy file="${JAR}" todir="." />
</target>
</project>