-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.xml
34 lines (27 loc) · 1.3 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
<?xml version="1.0" ?>
<project name="simple-graphics" basedir="." default="jarfile">
<!-- Initialize build properties -->
<target name="init" description="Initializes properties">
<property name="project.name" value="simple-graphics" />
<property name="src.dir" value="src" />
<property name="build.dir" value="build" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="version" value="0.2.1-SNAPSHOT" />
</target>
<!-- Creates the build directories to hold JAR and Class files -->
<target name="prepare" description="Creates the build and classes directories" depends="init">
<mkdir dir="${classes.dir}" />
</target>
<!-- Compiles the source code -->
<target name="compile" description="Compiles the code" depends="prepare">
<javac includeantruntime="false" srcdir="${src.dir}" destdir="${classes.dir}" />
</target>
<!-- Creates a JAR file -->
<target name="jarfile" description="Archives the code" depends="compile">
<jar destfile="${build.dir}/${project.name}-${version}.jar" basedir="${classes.dir}" />
</target>
<!-- Removes the build directory -->
<target name="clean" description="Clean up" depends="init">
<delete dir="${build.dir}" />
</target>
</project>