forked from flexunit/flexunit
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.xml
179 lines (157 loc) · 7.22 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<?xml version="1.0" encoding="UTF-8"?>
<!--
Since we're eating our own dogfood here, our build process is a bit non-standard. Assuming
the following call should be made to run this script:
ant -v clean package
the build order is as such:
clean->anttasks->core->cilistener->test->listeners->package
Reporting is something each project implements which we then have hooked into Hudson
to contribute to our CI process.
-->
<project name="FlexUnit4" basedir="." default="package">
<property environment="env" />
<!-- Version info -->
<property file="${basedir}/version.properties" />
<!-- Configuration -->
<property name="build.useFlex" value="true" />
<property name="finalName" value="flexunit.zip" />
<!-- Project locations -->
<property name="anttasks.loc" location="${basedir}/FlexUnit4AntTasks" />
<property name="core.loc" location="${basedir}/FlexUnit4" />
<property name="cilistener.loc" location="${basedir}/FlexUnit4CIListener" />
<property name="tests.loc" location="${basedir}/FlexUnit4Test" />
<property name="uilistener.loc" location="${basedir}/FlexUnit4UIListener" />
<property name="aircilistener.loc" location="${basedir}/FlexUnit4AirCIListener" />
<property name="flexcoverlistener.loc" location="${basedir}/FlexUnit4FlexCoverListener" />
<property name="turnkey.loc" location="${basedir}/FlexUnit4TurnKey" />
<property name="sampleCI.loc" location="${basedir}/FlexUnit4SampleCIProject" />
<!-- Cleans up all projects -->
<target name="clean">
<!-- Ask each project to clean up -->
<ant dir="${anttasks.loc}" target="clean" inheritall="false" />
<ant dir="${core.loc}" target="clean" inheritall="false" />
<ant dir="${cilistener.loc}" target="clean" inheritall="false" />
<ant dir="${tests.loc}" target="clean" inheritall="false" />
<ant dir="${uilistener.loc}" target="clean" inheritall="false" />
<ant dir="${aircilistener.loc}" target="clean" inheritall="false" />
<ant dir="${flexcoverlistener.loc}" target="clean" inheritall="false" />
<delete file="${basedir}/${finalName}" failonerror="false" />
</target>
<!-- Builds the FlexUnit4AntTasks project -->
<target name="anttasks">
<ant dir="${anttasks.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Builds the core FlexUnit4 project -->
<target name="core">
<ant dir="${core.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Prepares and builds the FlexUnit4CIListener project -->
<target name="cilistener" depends="core">
<ant dir="${cilistener.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Prepares and builds the FlexCover Listener project -->
<target name="flexcoverlistener" depends="core,cilistener">
<ant dir="${flexcoverlistener.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Prepares and builds the FlexUnit4Test project -->
<target name="test" depends="anttasks,core,cilistener,flexcoverlistener" unless="build.skipTests">
<ant dir="${tests.loc}" target="test" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<target name="listeners" depends="uilistener,aircilistener" />
<!-- Prepares and builds the FlexUnit4UIRunner project -->
<target name="uilistener" depends="core,cilistener">
<ant dir="${uilistener.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Prepares and builds the Air CI Listener project -->
<target name="aircilistener" depends="core,cilistener">
<ant dir="${aircilistener.loc}" target="package" inheritall="false">
<propertyset>
<propertyref prefix="build" />
</propertyset>
</ant>
</target>
<!-- Prepares and assembles the final zip artifact with all of the FlexUnit4 components and docs -->
<target name="package" depends="test,listeners">
<zip destfile="${basedir}/${finalName}">
<!-- Docs -->
<zipfileset dir="${anttasks.loc}/target/docs" prefix="flexunit/docs/anttasks" />
<zipfileset dir="${core.loc}/target/docs" prefix="flexunit/docs/flexunit" />
<zipfileset dir="${cilistener.loc}/target/docs" prefix="flexunit/docs/cilistener" />
<zipfileset dir="${uilistener.loc}/target/docs" prefix="flexunit/docs/uilistener" />
<zipfileset dir="${aircilistener.loc}/target/docs" prefix="flexunit/docs/aircilistener" />
<zipfileset dir="${flexcoverlistener.loc}/target/docs" prefix="flexunit/docs/flexcoverlistener" />
<!-- Artifacts -->
<zipfileset dir="${anttasks.loc}/target" prefix="flexunit">
<include name="*.jar" />
</zipfileset>
<zipfileset dir="${core.loc}/target" prefix="flexunit">
<include name="*core*.swc" />
</zipfileset>
<zipfileset dir="${cilistener.loc}/target" prefix="flexunit">
<include name="*.swc" />
</zipfileset>
<zipfileset dir="${flexcoverlistener.loc}/target" prefix="flexunit">
<include name="*.swc" />
</zipfileset>
<zipfileset dir="${uilistener.loc}/target" prefix="flexunit">
<include name="*.swc" />
</zipfileset>
<zipfileset dir="${aircilistener.loc}/target" prefix="flexunit">
<include name="*.swc" />
</zipfileset>
<!-- Turnkey -->
<zipfileset dir="${turnkey.loc}" prefix="flexunit/turnkey">
<exclude name="**/export/**/*" />
</zipfileset>
<zipfileset dir="${core.loc}/target" prefix="flexunit/turnkey/libs">
<include name="*core*.swc" />
</zipfileset>
<zipfileset dir="${uilistener.loc}/target" prefix="flexunit/turnkey/libs">
<include name="*.swc" />
</zipfileset>
<!-- Sample CI project -->
<zipfileset dir="${sampleCI.loc}" prefix="flexunit/sampleCIProject">
<exclude name="**/libs/**/*" />
</zipfileset>
<zipfileset dir="${anttasks.loc}/target" prefix="flexunit/sampleCIProject/libs">
<include name="*.jar" />
</zipfileset>
<zipfileset dir="${core.loc}/target" prefix="flexunit/sampleCIProject/libs">
<include name="*core*.swc" />
</zipfileset>
<zipfileset dir="${cilistener.loc}/target" prefix="flexunit/sampleCIProject/libs">
<include name="*.swc" />
</zipfileset>
<zipfileset dir="${uilistener.loc}/target" prefix="flexunit/sampleCIProject/libs">
<include name="*.swc" />
</zipfileset>
<zipfileset dir="${aircilistener.loc}/target" prefix="flexunit/sampleCIProject/libs">
<include name="*.swc" />
</zipfileset>
</zip>
</target>
</project>