forked from Multitallented/Proxis-Heroes-Skills
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
58 lines (52 loc) · 2.46 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
<project name="Proxis-Hero-Skills" default="build" basedir=".">
<description>
Heroes Skills Ant File Compiler
</description>
<!-- set global properties for this build -->
<property environment="env"/>
<property name="build.compiler" value="extJavac" />
<property name="dir.bin" value="bin" />
<property name="dir.dist" value="target" />
<property name="dir.bin.skills" value="com/herocraftonline/heroes/characters/skill/skills" />
<property name="dir.dist.skills" value="." />
<property name="toolhandler" value="../../Kingdoms of Arden Tool Handler/workspace/target" />
<property name="dir.lib" value="../../Kingdoms of Arden Heroes Skills/workspace/lib" />
<path id="classpath">
<fileset dir="${toolhandler}" includes="**/*.jar" />
<fileset dir="${dir.lib}" includes="*.jar" />
</path>
<taskdef resource="net/sf/antcontrib/antlib.xml" />
<target name="build">
<mkdir dir="${dir.dist}" />
<mkdir dir="${dir.dist}/${dir.dist.skills}" />
<mkdir dir="${dir.bin}" />
<mkdir dir="${dir.bin}/${dir.dist.skills}" />
<javac srcdir="src" debug="on" destdir="bin" classpathref="classpath" includeantruntime="false"/>
<antcall target="jar-skills" />
<delete dir="${dir.bin}" includes="**/*.class" excludes="**/*.jar" />
<antcall target="zip" />
</target>
<target name="jar-skills">
<foreach target="jar-skill" param="files">
<fileset dir="${dir.bin}/${dir.bin.skills}" includes="Skill*.class" excludes="Skill*$*.class" />
</foreach>
<delete file="${dir.bin}/skill.info" />
</target>
<target name="jar-skill">
<basename file="${files}" suffix=".class" property="basename" />
<echo message="${basename}" />
<echo file="${dir.bin}/skill.info" message="main-class: com.herocraftonline.heroes.characters.skill.skills.${basename}" />
<jar jarfile="${dir.dist}/${dir.dist.skills}/${basename}.jar" basedir="${dir.bin}" includes="${dir.bin.skills}/${basename}*.class skill.info">
<manifest>
<attribute name="Class-Path" value="../../Heroes.jar" />
</manifest>
</jar>
</target>
<target name="zip">
<zip destfile="${dir.dist}/Proxis-Heroes-Skills.zip">
<fileset dir="${dir.dist}" includes="*.jar"/>
<fileset dir="${dir.dist}" includes="${dir.dist.skills}/**/*.jar"/>
</zip>
<delete dir="${dir.dist}/${ant.project.name}"/>
</target>
</project>