-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
74 lines (68 loc) · 2.57 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
<project name="APOS" default="run-bot" basedir=".">
<property name="build" location="build"/>
<property name="scripts" location="script/out"/>
<property name="clientsrc" location="client/src/main/java"/>
<property name="scriptsrc" location="script/src/main/java"/>
<property name="jar" location="bot.jar"/>
<property name="javac.source" value="1.8"/>
<property name="javac.target" value="1.8"/>
<path id="compile.path">
<file file="${jar}"/>
<fileset dir="lib">
<include name="rsclassic.jar"/>
</fileset>
</path>
<target name="clean">
<delete file="${jar}"/>
<delete>
<fileset dir="${scripts}">
<include name="*.class"/>
</fileset>
</delete>
</target>
<target name="compile-bot">
<delete file="${jar}"/>
<delete dir="${build}"/>
<mkdir dir="${build}"/>
<javac srcdir="${clientsrc}" destdir="${build}" debug="on" includeantruntime="false" target="${javac.target}" encoding="UTF-8"
source="${javac.source}" classpathref="compile.path">
<compilerarg line="-Xlint:unchecked"/>
</javac>
<jar basedir="${build}" destfile="${jar}">
<manifest>
<attribute name="Main-Class" value="ClientInit"/>
<attribute name="Class-Path" value="lib/rsclassic.jar"/>
</manifest>
</jar>
<delete dir="${build}"/>
</target>
<target name="compile-scripts">
<fail message="Error: must compile bot before compiling scripts!">
<condition>
<not>
<available file="${jar}"/>
</not>
</condition>
</fail>
<javac srcdir="${scriptsrc}" destdir="${scripts}" debug="on" includeantruntime="false" target="${javac.target}" encoding="UTF-8"
source="${javac.source}" classpathref="compile.path">
<compilerarg line="-Xlint:unchecked -Xlint:deprecation"/>
</javac>
</target>
<target name="compile-all">
<antcall target="compile-bot"/>
<antcall target="compile-scripts"/>
</target>
<target name="run-bot">
<fail message="Error: must compile bot first!">
<condition>
<not>
<available file="${jar}"/>
</not>
</condition>
</fail>
<java classname="ClientInit" fork="true" classpathref="compile.path">
<jvmarg line="-Xms312m -Dsun.java2d.opengl=true"/>
</java>
</target>
</project>