summaryrefslogtreecommitdiff
blob: 51e132550077faa32aa23607acd678795eb5df6e (plain)
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
<?xml version="1.0"?>
<project name="channeleditor" default="build">
	<!-- some properties -->
	<property name="src.dir" value="src"/>
	<property name="resources.dir" value="src/java/"/>
	<property name="build.dir" value="build"/>
	<property name="dist.dir" value="dist"/>
	<property name="project.jar" value="${dist.dir}/${ant.project.name}.jar"/>
	<property name="target.jdk" value="1.4"/>

	<!-- init -->
	<target name="init">
		<mkdir dir="${dist.dir}"/>
	</target>

	<!-- compile everything -->
	<target name="compile" depends="init">
		<javac srcdir="${src.dir}"
			destdir="${build.dir}"
			source="${target.jdk}"
			target="${target.jdk}"
			encoding="ISO-8859-1"/>
		<copy todir="${build.dir}">
			<fileset dir="${resources.dir}" excludes="**/*.java"/>
		</copy>
	</target>

	<!-- build the jar files -->
	<target name="build" depends="compile">
		<jar jarfile="${project.jar}" basedir="${build.dir}">
			<manifest>
				<attribute name="Main-Class" value="${manifest.mainclass}"/>
			</manifest>
		</jar>
	</target>

	<!-- zip the sources -->
	<target name="sourcezip">
		<zip destfile="${dist.dir}/${ant.project.name}-src.zip">
			<zipfileset dir="${src.dir}" />
		</zip>
	</target>
</project>