-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
50 lines (42 loc) · 1.8 KB
/
build.xml
File metadata and controls
50 lines (42 loc) · 1.8 KB
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
<project name="Test Project." basedir = ".">
<property name = "lib.dir" value = "./libs"/>
<property name = "src.dir" value = "./src"/>
<property name = "build.dir" value = "./build"/>
<property name = "test.src.dir" value = "./tests"/>
<property name = "test.build.dir" value = "${test.src.dir}/build"/>
<path id="classpath">
<fileset dir="${lib.dir}" includes="ant-junit.jar" />
<pathelement path = "${build.dir}"/>
</path>
<target name = "init" description = "Make necessary directories.">
<mkdir dir = "${src.dir}"/>
<mkdir dir = "${lib.dir}"/>
<mkdir dir = "${test.src.dir}"/>
</target>
<target name="compile" depends = "init" description="compile the source">
<mkdir dir = "${build.dir}"/>
<javac srcdir = "${src.dir}" destdir = "${build.dir}" includeantruntime = "true"/>
</target>
<target name="test" depends = "compile" description="Compile and run tests.">
<mkdir dir = "${test.build.dir}"/>
<javac srcdir = "${test.src.dir}" destdir = "${test.build.dir}" includeantruntime = "true">
<classpath>
<path location = "${build.dir}"/>
<path location = "${test.build.dir}"/>
<path location = "${lib.dir}/ant-junit.jar"/>
</classpath>
</javac>
<java fork = "true" dir = "${test.build.dir}" classname = "org.junit.runner.JUnitCore">
<arg line = "Tests"/>
<classpath>
<path location = "${build.dir}"/>
<path location = "${test.build.dir}"/>
<path location = "${lib.dir}/ant-junit.jar"/>
</classpath>
</java>
</target>
<target name="clean" description="Delete current build data.">
<delete dir = "${build.dir}"/>
<delete dir = "${test.build.dir}"/>
</target>
</project>