-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·245 lines (212 loc) · 9.61 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<?xml version="1.0" encoding="utf-8"?>
<project name="LOGH"
default="Deploy All Development">
<!-- load properties file -->
<property file="build/build.properties" />
<!-- flex build macros -->
<import file="build/flex_build.xml" />
<!-- build type = developer/pre-production/production -->
<property name="build_type"
value="developer" />
<!-- web-app/ -->
<property name="output.dir.app"
value="${output.app.dir}" />
<!-- grails-app/views -->
<property name="output.dir.views"
value="${output.grails.app.dir}views" />
<!-- web-app/swf -->
<property name="output.dir.flex.app"
value="${output.flex.app.dir}" />
<!-- web-app/swf/modules -->
<property name="output.dir.modules"
value="${output.dir.flex.app}/modules" />
<!-- web-app/swf/rsls -->
<property name="output.dir.rsls"
value="${output.dir.flex.app}/rsls" />
<!--
**********************************************************************
*
* Targets
*
***********************************************************************
-->
<!-- Builds all items for development -->
<target name="Deploy All Development"
depends="Deploy All Flex Development">
</target>
<!-- Builds all items for pre-production -->
<target name="Deploy All Pre-Production"
depends="Deploy All Flex Pre-Production">
</target>
<!-- Builds all items for production -->
<target name="Deploy All Production"
depends="Deploy All Flex Production">
</target>
<!-- Builds all flex items for flex development -->
<target name="Deploy All Flex Development"
depends="Z-Set Output Directories, Z-Set Output Subdirectories, Z-Set Developer">
<sequential>
<antcall target="Copy Support Items" />
<antcall target="Build Component Library SWC" />
<antcall target="Build Styles" />
<antcall target="Build Application" />
<antcall target="Build All Modules" />
</sequential>
</target>
<!-- Builds all items for pre-production -->
<target name="Deploy All Flex Pre-Production"
depends="Z-Set Output Directories, Z-Set Output Subdirectories, Z-Set Pre-Production">
<sequential>
<antcall target="Copy Support Items" />
<antcall target="Build Component Library" />
<antcall target="Build Styles" />
<!--<antcall target="Build Test Suite" />-->
<antcall target="Build Application" />
<antcall target="Build All Modules" />
</sequential>
</target>
<!-- Builds all items for production -->
<target name="Deploy All Flex Production"
depends="Z-Set Output Directories, Z-Set Output Subdirectories, Z-Set Production">
<sequential>
<antcall target="Copy Support Items" />
<antcall target="Build Component Library" />
<antcall target="Build Styles" />
<antcall target="Build Application" />
<antcall target="Build All Modules" />
<!--<antcall target="Build ASDocs" />-->
</sequential>
</target>
<target name="Z-Set Output Directories">
<var name="output.dir.app"
unset="true" />
<property name="output.dir.app"
value="${output.app.dir}" />
<echo>output.dir.app: ${output.dir.app}</echo>
</target>
<target name="Z-Set Output Subdirectories">
<var name="output.dir.flex.app"
unset="true" />
<property name="output.dir.flex.app"
value="${output.flex.app.dir}" />
<var name="output.dir.modules"
unset="true" />
<property name="output.dir.modules"
value="${output.dir.flex.app}/modules" />
<var name="output.dir.rsls"
unset="true" />
<property name="output.dir.rsls"
value="${output.dir.flex.app}/rsls" />
</target>
<target name="Z-Set Production">
<var name="build_type"
unset="true" />
<property name="build_type"
value="production" />
<echo>Build type: ${build_type}</echo>
</target>
<target name="Z-Set Pre-Production">
<var name="build_type"
unset="true" />
<property name="build_type"
value="pre-production" />
<echo>Build type: ${build_type}</echo>
</target>
<target name="Z-Set Developer">
<var name="build_type"
unset="true" />
<property name="build_type"
value="developer" />
<echo>Build type: ${build_type}</echo>
</target>
<!-- Copies out assets and rsls, builds the style that also builds the component library -->
<target name="Copy Support Items">
<flex-deploy-assets outputDirectory="${output.dir.app}"
outputApplicationDirectory="${output.dir.flex.app}" /> <!-- web-app & web-app/swf -->
<flex-deploy-rsls outputrslsdirectory="${output.dir.rsls}" /> <!-- web-app/swf/rsls -->
<build-application-html applicationFile="${flex.app}"
applicationTitle="${flex.app.title}"
outputdirectory="${output.dir.views}" /> <!-- grails-app/views -->
</target>
<!-- Build component library SWC and RSL -->
<target name="Build Component Library"
depends="Build Component Library SWC, Build Component Library RSL" />
<!-- Build production library SWC -->
<target name="Build Component Library SWC">
<flex-compile-production-swc ouputrslsdirectory="${output.dir.rsls}"
swc-name="componentLibrary" /> <!-- web-app/swf/rsls -->
</target>
<!-- Build RSL from swc and update digest -->
<target name="Build Component Library RSL">
<create-rsl swc-name="componentLibrary" />
</target>
<!-- Build out styles swf -->
<target name="Build Styles">
<flex-compile-styles csslocation="${styles.flex.app}"
cssname="LOGH"
outputApplicationDirectory="${output.dir.flex.app}" /> <!-- web-app/swf -->
</target>
<!-- Compile the application file. -->
<target name="Build Application">
<flex-compile application="${flex.app}"
build.config="${build_type}"
applicationName="${flex.app.name}"
outputApplicationDirectory="${output.dir.flex.app}"
outputModuleDirectory="${output.dir.modules}"
outputRslsDirectory="${output.dir.rsls}" /> <!-- app=web-app/swf, modules=web-app/swf/modules, rsls=web-app/swf/rsls -->
</target>
<!-- build all modules -->
<target name="Build All Modules"
depends="Build LOGH Login Module, Build LOGH User Module" />
<!-- build login module -->
<target name="Build LOGH Login Module"
description="Build LOGH Login Module">
<module-compile modulePath="/com/loseorgohome/modules/LOGHLoginModule"
moduleName="LOGHLoginModule"
applicationName="${flex.app}"
build.config="${build_type}"
outputApplicationDirectory="${output.dir.flex.app}"
outputModuleDirectory="${output.dir.modules}"
outputRslsDirectory="${output.dir.rsls}" /> <!-- app=web-app/swf, modules=web-app/swf/modules, rsls=web-app/swf/rsls -->
</target>
<!-- build user module -->
<target name="Build LOGH User Module"
description="Build LOGH Users Module">
<module-compile modulePath="/com/loseorgohome/modules/LOGHUserModule"
moduleName="LOGHUserModule"
applicationName="${flex.app}"
build.config="${build_type}"
outputApplicationDirectory="${output.dir.flex.app}"
outputModuleDirectory="${output.dir.modules}"
outputRslsDirectory="${output.dir.rsls}" /> <!-- app=web-app/swf, modules=web-app/swf/modules, rsls=web-app/swf/rsls -->
</target>
<!-- Build out asdocs -->
<target name="Build ASDocs">
<flex-deploy-ASDoc outputApplicationDirectory="${output.dir.flex.app}"
outputRslDirectory="${output.dir.rsls}" /> <!-- app=web-app/swf, rsls=web-app/swf/rsls -->
</target>
<!-- Build RSL from swc and update digest -->
<target name="Build Third Party Library RSL">
<sequential>
<create-third-party-rsl swc-name="module-0.17"
lib-sub-dir="cairngorm3" />
<create-third-party-rsl swc-name="observerParsley-1.15"
lib-sub-dir="cairngorm3" />
<create-third-party-rsl swc-name="parsley-flex4-2.4.1"
lib-sub-dir="cairngorm3" />
<create-third-party-rsl swc-name="popup-1.9"
lib-sub-dir="cairngorm3" />
<create-third-party-rsl swc-name="popupParsley-1.9"
lib-sub-dir="cairngorm3" />
<create-third-party-rsl swc-name="spicelib-flex-2.4.0"
lib-sub-dir="cairngorm3" />
<create-third-party-rsl swc-name="validation-1.12"
lib-sub-dir="cairngorm3" />
</sequential>
</target>
<target name="Clean">
<delete dir="${output.dir.flex.app}" /> <!-- web-app/swf -->
<delete file="${output.dir.app}/crossdomain.xml" /> <!-- web-app -->
<delete file="${output.dir.views}/index.gsp" /> <!-- grails-app/views -->
</target>
</project>