Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 160 lines (136 sloc) 5.742 kB
0517835 @realityking ^ [#28600] Add a code style checker. Thanks Rouven
realityking authored
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <project name="joomla" default="build" basedir=".">
4 <property name="source" value="." />
ac2f1b1 @realityking Add a lint target to the build.
realityking authored
5 <property name="joomlasource" value="administrator,cli,components,includes,installation,language/en-GB,libraries/cms,modules,plugins,templates" />
0517835 @realityking ^ [#28600] Add a code style checker. Thanks Rouven
realityking authored
6
7 <target name="clean" description="Clean up and create artifact directories">
837a416 @mbabker Add Ant target to run phpDocumentor
mbabker authored
8 <delete dir="${basedir}/build/api" />
45b442a @mbabker Set up unit tests.
mbabker authored
9 <delete dir="${basedir}/build/coverage" />
0517835 @realityking ^ [#28600] Add a code style checker. Thanks Rouven
realityking authored
10 <delete dir="${basedir}/build/logs" />
0308b69 @realityking Make sure the build process works without error.
realityking authored
11 <delete dir="${basedir}/build/pdepend" />
0517835 @realityking ^ [#28600] Add a code style checker. Thanks Rouven
realityking authored
12
837a416 @mbabker Add Ant target to run phpDocumentor
mbabker authored
13 <mkdir dir="${basedir}/build/api" />
45b442a @mbabker Set up unit tests.
mbabker authored
14 <mkdir dir="${basedir}/build/coverage" />
0517835 @realityking ^ [#28600] Add a code style checker. Thanks Rouven
realityking authored
15 <mkdir dir="${basedir}/build/logs" />
0308b69 @realityking Make sure the build process works without error.
realityking authored
16 <mkdir dir="${basedir}/build/pdepend" />
0517835 @realityking ^ [#28600] Add a code style checker. Thanks Rouven
realityking authored
17 </target>
18
45b442a @mbabker Set up unit tests.
mbabker authored
19 <target name="phpunit" description="Run unit tests using PHPUnit and generates junit.xml and clover.xml">
844461e @mbabker Run phpunit with zend.enable_gc disabled due to CI segfaults
mbabker authored
20 <exec executable="phpunit">
21 <arg value="-d" />
22 <arg value="zend.enable_gc=0" />
23 </exec>
45b442a @mbabker Set up unit tests.
mbabker authored
24 </target>
25
dbf5b3c @realityking Add build rules for pdepend and phpmd.
realityking authored
26 <target name="parallelTasks" description="Run the pdepend, phpmd and phpcs tasks in parallel using a maximum of 2 threads.">
27 <parallel threadCount="2">
28 <sequential>
29 <antcall target="pdepend" />
30 <antcall target="phpmd" />
31 </sequential>
32 <antcall target="phpcs" />
33 </parallel>
34 </target>
35
0517835 @realityking ^ [#28600] Add a code style checker. Thanks Rouven
realityking authored
36 <target name="phpcs" description="Generate checkstyle.xml using PHP_CodeSniffer">
37 <exec executable="phpcs">
38 <arg value="--report=checkstyle" />
e2aa822 @mbabker Modifications to PHPCS config
mbabker authored
39 <arg value="--extensions=php" />
0517835 @realityking ^ [#28600] Add a code style checker. Thanks Rouven
realityking authored
40 <arg value="-p" />
41 <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
42 <arg value="--standard=${basedir}/build/phpcs/Joomla" />
43 <arg path="${source}" />
44 </exec>
45 </target>
45b442a @mbabker Set up unit tests.
mbabker authored
46
dbf5b3c @realityking Add build rules for pdepend and phpmd.
realityking authored
47 <target name="pdepend" description="Generate jdepend.xml and software metrics charts using PHP_Depend">
48 <exec executable="pdepend">
49 <arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
50 <arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" />
51 <arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" />
52 <arg value="--ignore=build,tests" />
53 <arg path="${source}" />
54 </exec>
55 </target>
56
02f956e @wilsonge Updates as discussed
wilsonge authored
57 <target name="installdep" description="Install build dependencies using composer">
58 <exec executable="composer">
59 <arg value="update" />
60 <arg value="--no-dev" />
61 </exec>
62 </target>
63
dbf5b3c @realityking Add build rules for pdepend and phpmd.
realityking authored
64 <target name="phpmd" description="Generate pmd.xml using PHPMD">
65 <exec executable="phpmd">
66 <arg path="${joomlasource}" />
67 <arg value="xml" />
68 <arg value="${basedir}/build/phpmd.xml" />
69 <arg value="--reportfile" />
70 <arg value="${basedir}/build/logs/pmd.xml" />
71 </exec>
72 </target>
73
837a416 @mbabker Add Ant target to run phpDocumentor
mbabker authored
74 <target name="phpdoc" description="Generate API documentation using phpDocumentor">
75 <exec executable="phpdoc">
78e2572 @mbabker Update list of resources to process for phpDocumentor
mbabker authored
76 <arg value="-i" />
77 <arg path="${basedir}/libraries/vendor/joomla/*/Tests/,${basedir}/libraries/vendor/joomla/string/src/phputf8/,${basedir}/libraries/vendor/composer/,${basedir}/libraries/vendor/joomla/event/vendor/,${basedir}/libraries/vendor/joomla/session/Joomla/Session/_Tests/,${basedir}/libraries/vendor/joomla/session/Joomla/Session/Tests/,${basedir}/libraries/idna_convert/" />
837a416 @mbabker Add Ant target to run phpDocumentor
mbabker authored
78 <arg value="-d" />
9f4c212 @mbabker Update phpdoc command
mbabker authored
79 <arg path="${basedir}/libraries/cms/,${basedir}/libraries/joomla/,${basedir}/libraries/legacy/,${basedir}/libraries/vendor/joomla/" />
837a416 @mbabker Add Ant target to run phpDocumentor
mbabker authored
80 <arg value="-f" />
a2a1bb1 @Bakual [bug] Move JClassLoader to be autoloaded, delete old files. Fixes #7307
Bakual authored
81 <arg path="${basedir}/libraries/loader.php,${basedir}/libraries/platform.php" />
837a416 @mbabker Add Ant target to run phpDocumentor
mbabker authored
82 <arg value="-t" />
83 <arg path="${basedir}/build/api/" />
84 <arg value="--template" />
85 <arg value="joomla" />
86 <arg value="--title" />
ca21f3b @mbabker Updating phpDoc builder for 3.4
mbabker authored
87 <arg value="Joomla! CMS 3.4 API" />
837a416 @mbabker Add Ant target to run phpDocumentor
mbabker authored
88 </exec>
89 </target>
90
ac2f1b1 @realityking Add a lint target to the build.
realityking authored
91 <target name="lint" description="Perform syntax check of sourcecode files">
92 <apply executable="php" failonerror="true">
93 <arg value="-l" />
94
95 <fileset dir="${basedir}/administrator">
96 <include name="**/*.php" />
97 <modified />
98 </fileset>
99
100 <fileset dir="${basedir}/cli">
101 <include name="**/*.php" />
102 <modified />
103 </fileset>
104
105 <fileset dir="${basedir}/components">
106 <include name="**/*.php" />
107 <modified />
108 </fileset>
109
110 <fileset dir="${basedir}/installation">
111 <include name="**/*.php" />
112 <modified />
113 </fileset>
114
115 <fileset dir="${basedir}/includes">
116 <include name="**/*.php" />
117 <modified />
118 </fileset>
119
120 <fileset dir="${basedir}/language/en-GB">
121 <include name="**/*.php" />
122 <modified />
123 </fileset>
124
125 <fileset dir="${basedir}/libraries">
126 <include name="**/*.php" />
127 <modified />
128 </fileset>
129
130 <fileset dir="${basedir}/modules">
131 <include name="**/*.php" />
132 <modified />
133 </fileset>
134
135 <fileset dir="${basedir}/templates">
136 <include name="**/*.php" />
137 <modified />
138 </fileset>
139 </apply>
140 </target>
141
3c754a8 @mbabker Add an Ant command for packaging com_joomlaupdate
mbabker authored
142 <target name="make-updatecomponent" description="Create an installable package from the com_joomlaupdate component" >
143 <delete dir="${basedir}/build/com_joomlaupdate-pkg" includeemptydirs="true" failonerror="false" />
144 <mkdir dir="${basedir}/build/com_joomlaupdate-pkg" />
145 <echo message="Create com_joomlaupdate package" />
146 <mkdir dir="${basedir}/build/com_joomlaupdate-pkg/staging" />
147 <mkdir dir="${basedir}/build/com_joomlaupdate-pkg/staging/admin" />
148 <copy todir="${basedir}/build/com_joomlaupdate-pkg/staging/admin">
149 <fileset dir="${basedir}/administrator/components/com_joomlaupdate" />
150 </copy>
151 <move file="${basedir}/build/com_joomlaupdate-pkg/staging/admin/joomlaupdate.xml" todir="${basedir}/build/com_joomlaupdate-pkg/staging" />
152
153 <echo message="Archiving package" />
154 <mkdir dir="${basedir}/build/com_joomlaupdate-pkg/packages" />
155 <zip destfile="${basedir}/build/com_joomlaupdate-pkg/packages/com_joomlaupdate.zip" basedir="${basedir}/build/com_joomlaupdate-pkg/staging" />
156 </target>
ac2f1b1 @realityking Add a lint target to the build.
realityking authored
157
dbf5b3c @realityking Add build rules for pdepend and phpmd.
realityking authored
158 <target name="build" depends="clean,phpunit,parallelTasks" />
0517835 @realityking ^ [#28600] Add a code style checker. Thanks Rouven
realityking authored
159 </project>
Something went wrong with that request. Please try again.