-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
72 lines (62 loc) · 2.76 KB
/
build.xml
File metadata and controls
72 lines (62 loc) · 2.76 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0" encoding="UTF-8"?>
<!-- Fwk Build Script -->
<project name="fwk" default="init" basedir=".">
<description>Fwk Build Script</description>
<property name="target_dir">build</property>
<target name="test" description="Execute tests with PHPUnit" depends="clean,prepare">
<exec dir="${basedir}" executable="phpunit" failonerror="false">
<arg line="
--log-junit ${target_dir}/phpunit-log.xml
--coverage-html ${target_dir}/coverage
--coverage-clover ${target_dir}/coverage.xml
--testdox-html ${target_dir}/testdox.html" />
</exec>
</target>
<target name="BUILD - phpcs" description="Execute CodeSniffer">
<exec dir="${basedir}" executable="phpcs">
<arg line="
--report-file=${target_dir}/codesniffer.xml
--report=checkstyle
--ignore=*vendor*,*Tests*,test.php
--report-full=${target_dir}/codesniffer-full.txt
--report-summary=${target_dir}/codesniffer-summary.txt
--extensions=php ${basedir}" />
</exec>
</target>
<target name="BUILD - phpmd" description="Execute PHP-MD">
<exec dir="${basedir}" executable="phpmd">
<arg line="
. html codesize,naming,unusedcode
--reportfile ${target_dir}/pmd.html
--exclude vendor,Tests,test.php
--suffixes php,php3,php4,php5,phtml,inc" />
</exec>
</target>
<target name="BUILD - pdepend" description="Execute PDEPEND">
<exec dir="${basedir}" executable="pdepend">
<arg line="--summary-xml=${target_dir}/pdepend.xml
--jdepend-chart=${target_dir}/pdepend-jdepend.svg
--overview-pyramid=${target_dir}/pdepend-pyramid.svg
--ignore=*vendor*,*Tests*,test.php
${basedir}" />
</exec>
</target>
<target name="BUILD - phpcpd" description="Execute Copy-Paste Detector">
<exec dir="${basedir}" executable="phpcpd">
<arg line="--log-pmd ${target_dir}/php-cpd.xml
--suffixes php,php5
--exclude vendor,Tests,test.php
${basedir}" />
</exec>
</target>
<target name="BUILD - All" description="Execute everything" depends="clean, test, BUILD - phpmd, BUILD - pdepend, BUILD - phpcpd, BUILD - phpcs">
</target>
<target name="clean" description="Clean build directory">
<delete dir="${target_dir}/*" />
<delete dir="${target_dir}" />
</target>
<target name="prepare" description="Prepare build directory">
<mkdir dir="${target_dir}" />
<mkdir dir="${target_dir}/coverage" />
</target>
</project>