-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
72 lines (60 loc) · 2.9 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
<project name="rscminus" default="run">
<property name="src.dir" value="src" />
<property name="build.dir" value="build" />
<property name="dist.dir" value="dist" />
<property name="assets.dir" value="assets" />
<property name="bin.dir" value="bin" />
<property name="jar.main-class" value="rscminus.game.Server" />
<property name="jar.name" value="${ant.project.name}.jar" />
<property name="jar.file" value="${dist.dir}/${jar.name}" />
<property name="jar.main-class.scraper" value="rscminus.scraper.Scraper" />
<property name="jar.name.scraper" value="${ant.project.name}-scraper.jar" />
<property name="jar.file.scraper" value="${dist.dir}/${jar.name.scraper}" />
<path id="classpath">
<fileset dir="${basedir}">
<include name="lib/*.jar" />
</fileset>
</path>
<target name="compile">
<mkdir dir="${build.dir}" />
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false" encoding="UTF-8">
<classpath refid="classpath" />
</javac>
</target>
<target name="dist" depends="compile">
<mkdir dir="${bin.dir}" />
<mkdir dir="${dist.dir}" />
<jar destfile="${build.dir}/deps.jar">
<zipgroupfileset dir="lib" includes="*.jar" />
</jar>
<jar destfile="${jar.file}" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="${jar.main-class}"/>
</manifest>
<fileset dir=".">
<include name="LICENSE" />
</fileset>
<zipfileset src="${build.dir}/deps.jar" excludes="META-INF/*.SF" />
</jar>
<jar destfile="${jar.file.scraper}" basedir="${build.dir}">
<manifest>
<attribute name="Main-Class" value="${jar.main-class.scraper}"/>
</manifest>
<fileset dir=".">
<include name="${assets.dir}/**" />
<include name="LICENSE" />
</fileset>
<zipfileset src="${build.dir}/deps.jar" excludes="META-INF/*.SF" />
</jar>
</target>
<target name="run" depends="dist">
<java jar="${jar.file}" dir="${bin.dir}" fork="true" >
<jvmarg value="-Xmx512m" />
</java>
</target>
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${bin.dir}" />
<delete dir="${dist.dir}" />
</target>
</project>