Skip to content

Commit 77a7775

Browse files
committed
Changed ant build.
1 parent 61a4cd9 commit 77a7775

File tree

2 files changed

+82
-3
lines changed

2 files changed

+82
-3
lines changed

build.xml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<!-- WARNING: Eclipse auto-generated file.
2+
<!-- WARNING: Eclipse auto-generated file.
33
Any modifications will be overwritten.
44
To include a user specific buildfile here, simply create one in the same
55
directory with the processing instruction <?eclipse.ant.import?>
@@ -19,6 +19,18 @@
1919
<exclude name="**/*.java"/>
2020
</fileset>
2121
</copy>
22+
<copy includeemptydirs="false" todir="bin">
23+
<fileset dir="Resource">
24+
<exclude name="**/*.launch"/>
25+
<exclude name="**/*.java"/>
26+
</fileset>
27+
</copy>
28+
<copy includeemptydirs="false" todir="bin">
29+
<fileset dir="Save">
30+
<exclude name="**/*.launch"/>
31+
<exclude name="**/*.java"/>
32+
</fileset>
33+
</copy>
2234
</target>
2335
<target name="clean">
2436
<delete dir="bin"/>
@@ -30,6 +42,8 @@
3042
<echo message="${ant.project.name}: ${ant.file}"/>
3143
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
3244
<src path="src"/>
45+
<src path="Resource"/>
46+
<src path="Save"/>
3347
<classpath refid="TowerDefence-2D.classpath"/>
3448
</javac>
3549
</target>
@@ -62,5 +76,4 @@
6276
</manifest>
6377
</jar>
6478
</target>
65-
</project>
66-
79+
</project>

build.xml.old

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<!-- WARNING: Eclipse auto-generated file.
3+
Any modifications will be overwritten.
4+
To include a user specific buildfile here, simply create one in the same
5+
directory with the processing instruction <?eclipse.ant.import?>
6+
as the first entry and export the buildfile again. --><project basedir="." default="build" name="TowerDefence-2D">
7+
<property environment="env"/>
8+
<property name="debuglevel" value="source,lines,vars"/>
9+
<property name="target" value="1.7"/>
10+
<property name="source" value="1.7"/>
11+
<path id="TowerDefence-2D.classpath">
12+
<pathelement location="bin"/>
13+
</path>
14+
<target name="init">
15+
<mkdir dir="bin"/>
16+
<copy includeemptydirs="false" todir="bin">
17+
<fileset dir="src">
18+
<exclude name="**/*.launch"/>
19+
<exclude name="**/*.java"/>
20+
</fileset>
21+
</copy>
22+
</target>
23+
<target name="clean">
24+
<delete dir="bin"/>
25+
</target>
26+
<target depends="clean" name="cleanall"/>
27+
<target depends="build-subprojects,build-project" name="build"/>
28+
<target name="build-subprojects"/>
29+
<target depends="init" name="build-project">
30+
<echo message="${ant.project.name}: ${ant.file}"/>
31+
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
32+
<src path="src"/>
33+
<classpath refid="TowerDefence-2D.classpath"/>
34+
</javac>
35+
</target>
36+
<target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
37+
<target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler">
38+
<copy todir="${ant.library.dir}">
39+
<fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
40+
</copy>
41+
<unzip dest="${ant.library.dir}">
42+
<patternset includes="jdtCompilerAdapter.jar"/>
43+
<fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
44+
</unzip>
45+
</target>
46+
<target description="compile project with Eclipse compiler" name="build-eclipse-compiler">
47+
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
48+
<antcall target="build"/>
49+
</target>
50+
<target name="Frame (5)">
51+
<java classname="Frame" failonerror="true" fork="yes">
52+
<classpath refid="TowerDefence-2D.classpath"/>
53+
</java>
54+
</target>
55+
<target name="jar">
56+
<mkdir dir="bin/jar"/>
57+
<jar destfile="bin/jar/TowerDefence2D.jar" basedir="bin">
58+
<fileset dir="." includes="Save/**" />
59+
<fileset dir="." includes="Resource/**" />
60+
<manifest>
61+
<attribute name="Main-Class" value="Frame"/>
62+
</manifest>
63+
</jar>
64+
</target>
65+
</project>
66+

0 commit comments

Comments
 (0)