This repository has been archived by the owner on Dec 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
79 lines (68 loc) · 2.54 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
<project name="Haxe XPath" basedir="." default="all">
<target name="all" depends="test,haxelib"/>
<target name="clean" description="Deletes all files generated by the build script.">
<delete>
<fileset file="haxedoc.xml"/>
<fileset file="xpath.zip"/>
<fileset file="test.n"/>
<fileset dir="test-java"/>
</delete>
</target>
<target name="haxedoc.xml" description="Generates API documentation XML.">
<exec executable="haxe" failonerror="true">
<arg value="-cp"/>
<arg file="src"/>
<arg value="-cp"/>
<arg file="doc"/>
<arg value="--macro"/>
<arg value="ImportAll.run()"/>
<arg value="-neko"/>
<arg file="doc.n"/>
<arg value="--no-output"/>
<arg value="-xml"/>
<arg file="haxedoc.xml"/>
</exec>
</target>
<target name="haxelib" depends="haxedoc.xml" description="Generates a Haxelib package for distribution.">
<delete file="xpath.zip"/>
<zip destfile="xpath.zip">
<fileset dir="src">
<include name="**/*.hx"/>
</fileset>
<fileset file="haxelib.json"/>
<fileset file="README.md"/>
<fileset file="LICENCE.txt"/>
<fileset file="AUTHORS.txt"/>
<fileset file="haxedoc.xml"/>
</zip>
</target>
<target name="test.neko" description="Runs the automated tests on Neko.">
<exec executable="haxe" failonerror="true">
<arg value="-cp"/>
<arg file="src"/>
<arg value="-cp"/>
<arg file="test"/>
<arg value="-neko"/>
<arg file="test.n"/>
<arg value="-main"/>
<arg value="xpath.Test"/>
</exec>
<exec executable="neko" failonerror="true">
<arg file="test.n"/>
</exec>
</target>
<target name="test.java" description="Runs the automated tests on Java.">
<exec executable="haxe" failonerror="true">
<arg value="-cp"/>
<arg file="src"/>
<arg value="-cp"/>
<arg file="test"/>
<arg value="-java"/>
<arg file="test-java"/>
<arg value="-main"/>
<arg value="xpath.Test"/>
</exec>
<java fork="true" jar="test-java/Test.jar" failonerror="true"/>
</target>
<target name="test" depends="test.neko, test.java" description="Runs the automated tests on all platforms"/>
</project>