Renamed version properties files (since it's not an XML file).
[shoot.git] / build.xml
blob7bf25001c294ad605d983e96181a83db7ecd9972
1 <project name="shoot" default="dist" basedir=".">
2  <target name="init">
3   <property name="sourceDir" value="src"/>
4   <property name="outputDir" value="classes"/>
5   <property name="distDir" value="dist"/>
6   <property file="version.properties"/>
7  </target>
8  <target name="clean" depends="init">
9   <delete dir="${outputDir}"/>
10  </target>
11  <target name="compile" depends="clean">
12   <mkdir dir="${outputDir}"/>
13   <javac srcdir="${sourceDir}" destdir="${outputDir}"/>
14  </target>
15  <target name="dist" depends="compile">
16   <mkdir dir="${distDir}"/>
17   <delete file="${distDir}/shoot-${version}.jar"/>
18   <delete file="$manifest.mf"/>
19   <manifest file="manifest.mf">
20    <attribute name="Main-Class" value="shoot_the_moon/ShootTheMoon"/>
21    <attribute name="Implementation-Version" value="${version}"/> 
22   </manifest>
23   <jar destfile="dist/shoot-${version}.jar" basedir="classes" manifest="manifest.mf"/>
24  </target>
25  <target name="run" depends="compile">
26   <java classname="shoot_the_moon.ShootTheMoon">
27    <classpath>
28     <pathelement path="${outputDir}"/>
29    </classpath>
30   </java>
31  </target>
32 </project>