Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 119 lines (105 sloc) 3.828 kB
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <project name="joomla-platform" default="build" basedir=".">
4 <property name="source" value="libraries"/>
1405073 @realityking Don't run PHPMD on 3rd party libraries.
realityking authored
5 <property name="joomlasource" value="libraries/joomla,libraries/platform.php,libraries/loader.php,libraries/import.php"/>
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
6
7 <target name="clean"
8 description="Clean up and create artifact directories">
9 <delete dir="${basedir}/build/api"/>
10 <delete dir="${basedir}/build/code-browser"/>
11 <delete dir="${basedir}/build/coverage"/>
12 <delete dir="${basedir}/build/logs"/>
13 <delete dir="${basedir}/build/pdepend"/>
14
15 <mkdir dir="${basedir}/build/api"/>
16 <mkdir dir="${basedir}/build/code-browser"/>
17 <mkdir dir="${basedir}/build/coverage"/>
18 <mkdir dir="${basedir}/build/logs"/>
19 <mkdir dir="${basedir}/build/pdepend"/>
20 </target>
21
22 <target name="phpunit"
23 description="Run unit tests using PHPUnit and generates junit.xml and clover.xml">
c6e7aae @ianmacl Continue build on error
ianmacl authored
24 <exec executable="phpunit"/>
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
25 </target>
26
27 <target name="parallelTasks"
28 description="Run the pdepend, phpmd, phpcpd, phpcs, phpdoc and phploc tasks in parallel using a maximum of 2 threads.">
29 <parallel threadCount="2">
30 <sequential>
31 <antcall target="pdepend"/>
32 <antcall target="phpmd"/>
33 </sequential>
34 <antcall target="phpcpd"/>
35 <antcall target="phpcs"/>
36 <antcall target="phpdoc"/>
37 <antcall target="phploc"/>
38 </parallel>
39 </target>
40
41 <target name="pdepend"
42 description="Generate jdepend.xml and software metrics charts using PHP_Depend">
43 <exec executable="pdepend">
44 <arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
45 <arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" />
46 <arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" />
47 <arg path="${source}" />
48 </exec>
49 </target>
50
51 <target name="phpmd"
52 description="Generate pmd.xml using PHPMD">
53 <exec executable="phpmd">
1405073 @realityking Don't run PHPMD on 3rd party libraries.
realityking authored
54 <arg path="${joomlasource}" />
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
55 <arg value="xml" />
56 <arg value="${basedir}/build/phpmd.xml" />
57 <arg value="--reportfile" />
58 <arg value="${basedir}/build/logs/pmd.xml" />
59 </exec>
60 </target>
61
62 <target name="phpcpd"
63 description="Generate pmd-cpd.xml using PHPCPD">
64 <exec executable="phpcpd">
65 <arg value="--log-pmd" />
66 <arg value="${basedir}/build/logs/pmd-cpd.xml" />
9a12d9c @LouisLandry Update build to only look at libraries/joomla for some basic reporting.
LouisLandry authored
67 <arg path="${source}/joomla" />
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
68 </exec>
69 </target>
70
71 <target name="phploc"
72 description="Generate phploc.csv">
73 <exec executable="phploc">
74 <arg value="--log-csv" />
75 <arg value="${basedir}/build/logs/phploc.csv" />
9a12d9c @LouisLandry Update build to only look at libraries/joomla for some basic reporting.
LouisLandry authored
76 <arg path="${source}/joomla" />
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
77 </exec>
78 </target>
79
80 <target name="phpcs"
81 description="Generate checkstyle.xml using PHP_CodeSniffer">
a5048a3 @ianmacl Turning phpcs output on
ianmacl authored
82 <exec executable="phpcs">
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
83 <arg value="--report=checkstyle" />
84 <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
8613166 @elkuku Take the "local" sniff standard instead of the "system" one.
elkuku authored
85 <arg value="--standard=${basedir}/build/phpcs/Joomla" />
a072650 @mbabker Missed a comma...
mbabker authored
86 <arg value="--ignore=${source}/phpmailer,${source}/phputf8,${source}/simplepie/,${source}/config.example.php" />
608c1da @mbabker CodeSniff on base libraries files
mbabker authored
87 <arg path="${source}" />
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
88 </exec>
89 </target>
90
91 <target name="phpdoc"
92 description="Generate API documentation using PHPDocumentor">
93 <exec executable="phpdox">
94 <arg value="-c" />
95 <arg path="${source}" />
96 <arg value="-d" />
97 <arg path="${basedir}/build/api" />
98 <arg value="-x" />
3aa2d2c @ianmacl Fixing build issue which was scrapping reports
ianmacl authored
99 <arg path="${basedir}/build/docs" />
9ebf8b8 @ianmacl Adding files for continuous integration
ianmacl authored
100 <arg value="-g" />
101 <arg value="html" />
102 </exec>
103 </target>
104
105 <target name="phpcb"
106 description="Aggregate tool output with PHP_CodeBrowser">
107 <exec executable="phpcb">
108 <arg value="--log" />
109 <arg path="${basedir}/build/logs" />
110 <arg value="--source" />
111 <arg path="${source}" />
112 <arg value="--output" />
113 <arg path="${basedir}/build/code-browser" />
114 </exec>
115 </target>
116
117 <target name="build" depends="clean,parallelTasks,phpunit,phpcb"/>
118 </project>
Something went wrong with that request. Please try again.