-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
70 lines (62 loc) · 2.71 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
<project name="baker" default="build" basedir=".">
<property file="${project.basedir}/build.properties"/>
<property file="${phing.dir.baker}/build.properties"/>
<!-- Imports of other targets -->
<import file="${dir.autophing}/phplint/phplint.xml"/>
<import file="${dir.autophing}/phpunit/phpunit.xml"/>
<import file="${dir.autophing}/phpmd/phpmd.xml"/>
<import file="${dir.autophing}/pdepend/pdepend.xml"/>
<import file="${dir.autophing}/phpcs/phpcs.xml"/>
<target name="build" description="Creates a full build."
depends="-prepare, phplint, phpunit, phpmd, pdepend, phpcs, phploc, phpcpd, phpcb, phpdoc"/>
<target name="clean" description="Cleanup build artifacts">
<delete dir="${dir.build}" includeemptydirs="true"/>
</target>
<target name="-prepare" hidden="true" depends="clean" description="Prepare for build">
<mkdir dir="${dir.api-docs}"/>
<mkdir dir="${dir.code-coverage}"/>
<mkdir dir="${dir.code-browser}"/>
<mkdir dir="${dir.pdepend}/build/pdepend"/>
<mkdir dir="${dir.xml-files}"/>
</target>
<target name="phpdoc" description="Generates API Documentation">
<exec passthru="${passthru}" executable="${phpdoc.file}">
<arg value="--quiet"/>
<arg value="--template"/>
<arg value="${phpdoc.template}"/>
<arg value="--directory"/>
<arg value="${phpdoc.source}"/>
<arg value="--target"/>
<arg value="${dir.api-docs}"/>
</exec>
<delete includeemptydirs="true">
<fileset dir="${dir.api-docs}">
<include name="**/*.dat"/>
</fileset>
</delete>
</target>
<target name="phploc" description="Measure project size using PHPLOC">
<exec passthru="${passthru}" executable="${phploc.file}">
<arg value="--count-tests"/>
<arg value="--log-xml"/>
<arg path="${phploc.xml.file}"/>
<arg path="${phploc.source}"/>
</exec>
</target>
<target name="phpcpd" description="Check project copy-pasted code">
<exec passthru="${passthru}" executable="${phpcpd.file}">
<arg value="--log-pmd"/>
<arg value="${phpcpd.xml.file}"/>
<arg value="${phpcpd.source}"/>
</exec>
</target>
<target name="phpcb" depends="phpunit, phpmd, phpcs"
description="Create a code browser that also shows violations.">
<exec passthru="${passthru}" executable="${phpcb.file}">
<arg value="--log"/>
<arg value="${dir.xml-files}"/>
<arg value="--output"/>
<arg value="${dir.code-browser}"/>
</exec>
</target>
</project>