forked from NearInfinityBrowser/NearInfinity
-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.xml
108 lines (99 loc) · 4.88 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
102
103
104
105
106
107
108
<?xml version="1.0" encoding="UTF-8"?>
<project name="NearInfinity" default="compile" basedir=".">
<property name="jar.file" value="NearInfinity.jar"/>
<property name="build.path" location="build/src"/>
<property name="src.path" location="src"/>
<property name="lib.path.rel" value="lib"/>
<property name="lib.path.abs" location="${lib.path.rel}"/>
<property name="tinylog-api.file" value="${lib.path.rel}/tinylog/tinylog-api-2.7.0.jar"/>
<property name="tinylog-impl.file" value="${lib.path.rel}/tinylog/tinylog-impl-2.7.0.jar"/>
<property name="jorbis.file" value="${lib.path.rel}/jorbis/jorbis.jar"/>
<property name="rsyntaxtextarea.file" value="${lib.path.rel}/rsyntaxtextarea/rsyntaxtextarea.jar"/>
<property name="jhexview.file" value="${lib.path.rel}/jhexview/jhexview.jar"/>
<property name="montemedia.file" value="${lib.path.rel}/montemedia/montemedia.jar"/>
<property name="apng_writer.file" value="${lib.path.rel}/apng-writer/apng-writer-core.jar"/>
<property name="json.file" value="${lib.path.rel}/json/json-20230227.jar"/>
<property name="commonmark.file" value="${lib.path.rel}/commonmark/commonmark-0.21.0.jar"/>
<property name="flatlaf.file" value="${lib.path.rel}/flatlaf/flatlaf-3.4.jar"/>
<property name="flatlafthemes.file" value="${lib.path.rel}/flatlaf/flatlaf-intellij-themes-3.4.jar"/>
<property name="javacc.home" value="lib/javacc"/>
<property name="parser.path" value="org/infinity/resource/bcs/parser"/>
<property name="src.parser.path" value="${src.path}/org/infinity/resource/bcs/parser"/>
<property name="parser.file" value="BafParser"/>
<target name="compile" depends="clean">
<mkdir dir="${build.path}"/>
<javac srcdir="${src.path}"
destdir="${build.path}"
encoding="UTF-8"
source="1.8"
target="1.8"
includeantruntime="false"
deprecation="false"
debug="false"
debuglevel="lines,vars,source"
classpath="${classpath}:${tinylog-api.file}:${tinylog-impl.file}:${jorbis.file}:${rsyntaxtextarea.file}:${jhexview.file}:${montemedia.file}:${apng_writer.file}:${json.file}:${commonmark.file}:${flatlaf.file}:${flatlafthemes.file}">
<!-- Various debugging options: -->
<compilerarg value="-Xlint:cast"/>
<compilerarg value="-Xlint:classfile"/>
<compilerarg value="-Xlint:deprecation"/>
<compilerarg value="-Xlint:divzero"/>
<compilerarg value="-Xlint:empty"/>
<!-- <compilerarg value="-Xlint:fallthrough"/> -->
<compilerarg value="-Xlint:finally"/>
<compilerarg value="-Xlint:options"/>
<compilerarg value="-Xlint:overloads"/>
<compilerarg value="-Xlint:overrides"/>
<compilerarg value="-Xlint:path"/>
<compilerarg value="-Xlint:processing"/>
<!-- <compilerarg value="-Xlint:rawtypes"/> -->
<compilerarg value="-Xlint:static"/>
<!-- <compilerarg value="-Xlint:try"/> -->
<compilerarg value="-Xlint:unchecked"/>
<compilerarg value="-Xlint:varargs"/>
<!-- Enable all debugging options at once -->
<!-- <compilerarg value="-Xlint:all"/> -->
</javac>
<copy todir="${build.path}">
<fileset dir="${src.path}" excludes="**/*.java"/>
</copy>
<jar destfile="${jar.file}"
basedir="${build.path}"
includes="**/*"
level="9">
<zipgroupfileset dir="." includes="${tinylog-api.file}"/>
<zipgroupfileset dir="." includes="${tinylog-impl.file}"/>
<zipgroupfileset dir="." includes="${jorbis.file}"/>
<zipgroupfileset dir="." includes="${rsyntaxtextarea.file}"/>
<zipgroupfileset dir="." includes="${jhexview.file}"/>
<zipgroupfileset dir="." includes="${montemedia.file}"/>
<zipgroupfileset dir="." includes="${apng_writer.file}"/>
<zipgroupfileset dir="." includes="${json.file}"/>
<zipgroupfileset dir="." includes="${commonmark.file}"/>
<zipgroupfileset dir="." includes="${flatlaf.file}"/>
<zipgroupfileset dir="." includes="${flatlafthemes.file}"/>
<manifest>
<attribute name="Main-Class" value="org.infinity.NearInfinity"/>
</manifest>
</jar>
</target>
<target name="parser-generate" depends="parser-clean">
<jjtree target="${src.parser.path}/${parser.file}.jjt" outputdirectory="${src.parser.path}" javacchome="${javacc.home}"/>
<javacc target="${src.parser.path}/${parser.file}.jj" outputdirectory="${src.parser.path}" javacchome="${javacc.home}"/>
</target>
<target name="clean">
<delete dir="${build.path}"/>
<delete file="${jar.file}"/>
<delete>
<fileset dir="${src.path}" includes="**/*.class"/>
</delete>
</target>
<target name="parser-clean">
<delete failonerror="false" quiet="false">
<fileset dir="${src.parser.path}">
<include name="*.java"/>
<exclude name="BafNode*.java"/>
</fileset>
<fileset file="${src.parser.path}/${parser.file}.jj"/>
</delete>
</target>
</project>