-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
66 lines (56 loc) · 2 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
<project name="PHPca" default="all" basedir=".">
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="tests" location="tests"/>
<property name="build" location="_build"/>
<property name="output" location="_logs"/>
<target name="init">
<mkdir dir="${build}"/>
<mkdir dir="${output}"/>
<mkdir dir="${output}/coverage-html"/>
<mkdir dir="${output}/coverage-xml"/>
<mkdir dir="${output}/junit"/>
<mkdir dir="${output}/testdox"/>
<mkdir dir="${output}/apidoc"/>
<mkdir dir="${output}/phar"/>
</target>
<target name="clean">
<delete dir="${build}"/>
<delete dir="${output}"/>
</target>
<target name="create_autoloader">
<exec executable="phpab" failonerror="true">
<arg value="-o"/>
<arg value="${src}/Autoload.php"/>
<arg value="${src}"/>
</exec>
<exec executable="phpab" failonerror="true">
<arg value="-o"/>
<arg value="${tests}/Autoload.php"/>
<arg value="${tests}"/>
</exec>
</target>
<target name="test" depends="init">
<exec executable="phpunit" failonerror="true">
<arg value="--configuration phpunit.xml"/>
</exec>
</target>
<target name="apidoc" depends="init">
<exec executable="phpdoc" failonerror="true">
<arg value="-d"/>
<arg value="${src}"/>
<arg value="-t"/>
<arg value="${output}/apidoc"/>
<arg value="-o"/>
<arg value="HTML:frames:earthli"/>
<arg value="-i"/>
<arg value="Autoload.php"/>
</exec>
</target>
<target name="phar" description="Creates Phar archive.">
<exec dir="${basedir}" executable="php" failonerror="true">
<arg line="CreatePhar.php" />
</exec>
</target>
<target name="all" depends="clean, init, test, apidoc"/>
</project>