Changing to using ant for compiling.

This commit is contained in:
Deathsbreed 2014-09-20 18:52:10 -05:00
parent bc6085609f
commit d072de67dd
2 changed files with 30 additions and 4 deletions

5
.gitignore vendored
View File

@ -1,5 +1,2 @@
# Ignore binary files # Ignore binary files
bin/* bin/
# Just in case some .class files escape:
*.class

29
build.xml Normal file
View File

@ -0,0 +1,29 @@
<project name="SpaceShipSim" basedir="." default="main" >
<property name="src.dir" value="src" />
<property name="bin.dir" value="bin" />
<property name="classes.dir" value="${bin.dir}/classes" />
<property name="jar.dir" value="${bin.dir}/jar" />
<property name="main-class" value="spaceshipsim.SpaceShipSim" />
<target name="clean" >
<delete dir="bin" />
</target>
<target name="compile" >
<mkdir dir="${classes.dir}" />
<javac srcdir="${src.dir}" destdir="${classes.dir}" />
</target>
<target name="jar" depends="compile" >
<mkdir dir="${jar.dir}" />
<jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}" >
<manifest>
<attribute name="Main-Class" value="${main-class}" />
</manifest>
</jar>
</target>
<target name="run" depends="jar" >
<java jar="${jar.dir}/${ant.project.name}.jar" fork="true" />
</target>
</project>