-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
90 lines (82 loc) · 2.68 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<project name="java-pathfinding" default="dist" basedir=".">
<description>
Compiles the Java port of python-pathfinding
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="bin"/>
<property name="dist" location="dist"/>
<property name="docs" location="docs"/>
<property name="libs" location="libs"/>
<property name="testng" location="${libs}/testng-6.1.1.jar"/>
<property name="test-src" location="tests"/>
<property name="test-bin" location="tests-bin"/>
<property name="test-results" location="tests-out"/>
<taskdef name="testng" classpath="${testng}"
classname="org.testng.TestNGAntTask"/>
<target name="init" depends="clean">
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${docs}"/>
<mkdir dir="${test-bin}"/>
</target>
<target name="compile" depends="init"
description="compile the source">
<javac srcdir="${src}" destdir="${build}" debug="true"
debuglevel="lines,vars,source"/>
</target>
<target name="compile-tests" depends="compile"
description="compile the sources for the tests">
<javac srcdir="${test-src}" destdir="${test-bin}" debug="true"
debuglevel="lines,vars,source">
<classpath>
<pathelement path="${build}"/>
<pathelement path="${testng}"/>
</classpath>
</javac>
</target>
<target name="document">
<javadoc package="pipeep.*"
sourcepath="${src}"
destdir="${docs}"
author="true"
version="true"
use="true"
windowtitle="Pathfinding API - JavaDoc">
<doctitle><![CDATA[<h1>Pathfinding API</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2011 Benjamin Woodruff. GPLv3
Licensed.
<p>Fork us on
<a href = "http://github.com/CBCJVM/java-pathfinding">github</a>
!</i>]]>
</bottom>
<tag name=".todo" scope="all" description="To Do:"/>
</javadoc>
</target>
<target name="dist" description="generate the distribution">
<parallel>
<antcall target="compile"/>
<antcall target="document"/>
</parallel>
<mkdir dir="${dist}/lib"/>
<jar jarfile="${dist}/lib/pathfinding.jar" basedir="${build}"/>
</target>
<target name="test" description="Run TestNG tests"
depends="compile-tests">
<testng outputDir="${test-results}">
<classpath>
<pathelement path="${build}"/>
<pathelement path="${test-bin}"/>
<pathelement path="${testng}"/>
</classpath>
<classfileset dir="${test-bin}"/>
</testng>
</target>
<target name="clean" description="clean up">
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${docs}"/>
<delete dir="${test-bin}"/>
<delete dir="${test-results}"/>
</target>
</project>