forked from bjornharrtell/extjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
453 lines (404 loc) · 16.6 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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
<project name="extjs" default="build" basedir=".">
<target name="find-cmd" unless="cmd.dir">
<!--
Run "sencha which" to find the Sencha Cmd basedir and get "cmd.dir" setup. We
need to execute the command with curdir set properly for Cmd to pick up that we
are running for an application.
-->
<exec executable="sencha" dir="${basedir}">
<arg value="which"/><arg value="-o=$cmddir$"/>
</exec>
<!-- Now read the generated properties file and delete it -->
<property file="$cmddir$"/>
<delete file="$cmddir$"/>
</target>
<target name="init-antcontrib" depends="find-cmd">
<echo>Using Sencha Cmd from ${cmd.dir}</echo>
<taskdef resource="net/sf/antcontrib/antlib.xml"
loaderref="senchaloader">
<classpath>
<pathelement location="${cmd.dir}/lib/ant-contrib-1.0b3.jar"/>
<pathelement location="${cmd.dir}/lib/commons-httpclient-3.0.1.jar"/>
<pathelement location="${cmd.dir}/lib/commons-logging-1.0.4.jar"/>
<pathelement location="${cmd.dir}/lib/commons-codec-1.3.jar"/>
</classpath>
</taskdef>
</target>
<target name="init-sencha-cmd" depends="init-antcontrib">
<taskdef resource="com/sencha/ant/antlib.xml"
classpath="${cmd.dir}/sencha.jar"
loaderref="senchaloader"/>
</target>
<target name="init-all" depends="init-sencha-cmd">
<property name="build.dir" location="${basedir}"/>
<property name="build.docs.dir" location="${build.dir}/docs"/>
<echo>build.dir: ${build.dir}</echo>
</target>
<!-- ****************************************************************** -->
<target name="build" depends="init-all"
description="Build the SDK from source">
<!--
Lay down the file header so we can append the rest from the compiler.
-->
<for list="ext-core,ext-foundation,ext-all-sandbox,ext-all-rtl-sandbox" param="file">
<sequential>
<for list=".js,-dev.js,-debug-w-comments.js" param="sfx">
<sequential>
<copy file="${build.dir}/file-header.js"
tofile="${build.dir}/builds/@{file}@{sfx}" overwrite="true"/>
</sequential>
</for>
</sequential>
</for>
<for list="ext,ext-all,ext-all-rtl" param="file">
<sequential>
<for list=".js,-dev.js,-debug-w-comments.js" param="sfx">
<sequential>
<copy file="${build.dir}/file-header.js"
tofile="${build.dir}/@{file}@{sfx}" overwrite="true"/>
</sequential>
</for>
</sequential>
</for>
<!--
Compile from sources and appending to stubs containing just the license header.
-->
<x-sencha-command dir="${basedir}">
compile
-ignore=diag
# Remove the license header from the source files:
-prefix
${basedir}/file-header.js
# Build *-dev.js files - these have all "debug" conditional code active
# for use in development mode.
-options=debug:true
concatenate
+append
-output-file=${build.dir}/ext-all-rtl-dev.js
and
concatenate
+append
-sandbox=Ext4:x4-
-output-file=${build.dir}/builds/ext-all-rtl-sandbox-dev.js
and
exclude
-namespace=Ext.rtl
and
concatenate
+append
-output-file=${build.dir}/ext-all-dev.js
and
concatenate
+append
-sandbox=Ext4:x4-
-output-file=${build.dir}/builds/ext-all-sandbox-dev.js
and
union
-tag=core
and
concatenate
+append
-output-file=${build.dir}/ext-dev.js
and
concatenate
+append
-output-file=${build.dir}/builds/ext-core-dev.js
and
union
-tag=foundation
and
concatenate
+append
-output-file=${build.dir}/builds/ext-foundation-dev.js
and
# Build *-debug-w-comments.js files - these are comment stripped to give
# *-debug.js files. These have normal whitespace and are intended to be
# debuggable versions of *-all.js files. They do not contain "dev mode"
# diagnostic code.
-options=debug:false
include
+all
and
concatenate
+append
-output-file=${build.dir}/ext-all-rtl-debug-w-comments.js
and
concatenate
+append
-sandbox=Ext4:x4-
-output-file=${build.dir}/builds/ext-all-rtl-sandbox-debug-w-comments.js
and
exclude
-namespace=Ext.rtl
and
concatenate
+append
-output-file=${build.dir}/ext-all-debug-w-comments.js
and
concatenate
+append
-sandbox=Ext4:x4-
-output-file=${build.dir}/builds/ext-all-sandbox-debug-w-comments.js
and
union
-tag=core
and
concatenate
+append
-output-file=${build.dir}/ext-debug-w-comments.js
and
concatenate
+append
-output-file=${build.dir}/builds/ext-core-debug-w-comments.js
and
union
-tag=foundation
and
concatenate
+append
-output-file=${build.dir}/builds/ext-foundation-debug-w-comments.js
and
# Generate bootstrap data in to ext-dev.js and ext-debug-w-comments.js to
# enable the dynamic loader.
include
+all
and
exclude
-tag=core
and
metadata
+append
+alternates
-base-path=${build.dir}
-output-file=${build.dir}/ext-debug-w-comments.js
and
metadata
+append
+alias
-base-path=${build.dir}
-output-file=${build.dir}/ext-debug-w-comments.js
and
metadata
+append
+alternates
-base-path=${build.dir}
-output-file=${build.dir}/ext-dev.js
and
metadata
+append
+alias
-base-path=${build.dir}
-output-file=${build.dir}/ext-dev.js
and
# Optimize and compress the builds
-options=debug:false
include
+all
and
optimize
-define-rewrite
and
concatenate
+append
+yui
-output-file=${build.dir}/ext-all-rtl.js
and
concatenate
+append
+yui
-sandbox=Ext4:x4-
-output-file=${build.dir}/builds/ext-all-rtl-sandbox.js
and
exclude
-namespace=Ext.rtl
and
concatenate
+append
+yui
-output-file=${build.dir}/ext-all.js
and
concatenate
+append
+yui
-sandbox=Ext4:x4-
-output-file=${build.dir}/builds/ext-all-sandbox.js
and
union
-tag=core
and
concatenate
+append
+yui
-output-file=${build.dir}/ext.js
and
concatenate
+append
+yui
-output-file=${build.dir}/builds/ext-core.js
and
union
-tag=foundation
and
concatenate
+append
+yui
-output-file=${build.dir}/builds/ext-foundation.js
</x-sencha-command>
<!--
Strip comments and compress all flavors.
-->
<for list="ext,ext-all,ext-all-rtl,builds/ext-all-sandbox,builds/ext-all-rtl-sandbox,builds/ext-core,builds/ext-foundation"
param="kind">
<sequential>
<x-strip-js srcfile="${build.dir}/@{kind}-debug-w-comments.js"
outfile="${build.dir}/@{kind}-debug.js"/>
</sequential>
</for>
</target>
<target name="examples" depends="init-all">
<x-sencha-command>
compile
--ignore=diag,rtl/
--classpath=${basedir}/examples/shared,${basedir}/examples/ux
--classpath=${basedir}/examples/desktop
--classpath=${basedir}/examples/portal
--classpath=${basedir}/examples/grouptabs
--classpath=${basedir}/examples/kitchensink
--classpath=${basedir}/examples/app/simple
--classpath=${basedir}/examples/simple-tasks
--classpath=${basedir}/examples/app/nested-loading
--classpath=${basedir}/examples/app/feed-viewer
--options=debug:false
page
--scripts=../common.js
--input-file=${basedir}/examples/desktop/desktop.html
--output=${build.dir}/examples/desktop/compiled-desktop.html
--name=desktop
and
page
--scripts=../common.js
--input-file=${basedir}/examples/grouptabs/grouptabs.html
--output=${build.dir}/examples/grouptabs/compiled-grouptabs.html
--name=grouptabs
and
page
--scripts=../common.js
--input-file=${basedir}/examples/kitchensink/index.html
--output=${build.dir}/examples/kitchensink/compiled-index.html
--name=kitchensink
and
page
--scripts=../../common.js
--input-file=${basedir}/examples/app/simple/simple.html
--output=${build.dir}/examples/app/simple/compiled-simple.html
--name=simpleapp
and
page
--scripts=../common.js
--input-file=${basedir}/examples/simple-tasks/index.html
--output=${build.dir}/examples/simple-tasks/compiled-index.html
--name=simpletasks
and
page
--scripts=../../common.js
--input-file=${basedir}/examples/app/nested-loading/nested-loading.html
--output=${build.dir}/examples/app/nested-loading/compiled-nested-loading.html
--name=nested-loading
and
page
--scripts=../../common.js
--input-file=${basedir}/examples/app/feed-viewer/feed-viewer.html
--output=${build.dir}/examples/app/feed-viewer/compiled-feed-viewer.html
--name=feed-viewer
and
page
--scripts=../common.js
--input-file=${basedir}/examples/portal/portal.html
--output=${build.dir}/examples/portal/compiled-portal.html
--name=portal
and
intersect
-min=6
-set=desktop,grouptabs,kitchensink,simpleapp,simpletasks,nested-loading,feed-viewer,portal
and
save
common
and
concatenate
--strip-comments=true
--output-file=${build.dir}/examples/common.js
and
restore
portal
and
exclude
-set=common
and
concatenate
--output-file=${build.dir}/examples/portal/all-classes.js
and
restore
feed-viewer
and
exclude
-set=common
and
concatenate
--output-file=${build.dir}/examples/app/feed-viewer/all-classes.js
and
restore
nested-loading
and
exclude
-set=common
and
concatenate
--output-file=${build.dir}/examples/app/nested-loading/all-classes.js
and
restore
simpletasks
and
exclude
-set=common
and
concatenate
--output-file=${build.dir}/examples/simple-tasks/all-classes.js
and
restore
simpleapp
and
exclude
-set=common
and
concatenate
--output-file=${build.dir}/examples/app/simple/all-classes.js
and
restore
kitchensink
and
exclude
-set=common
and
concatenate
--output-file=${build.dir}/examples/kitchensink/all-classes.js
and
restore
grouptabs
and
exclude
-set=common
and
concatenate
--output-file=${build.dir}/examples/grouptabs/all-classes.js
and
restore
desktop
and
exclude
-set=common
and
concatenate
--output-file=${build.dir}/examples/desktop/all-classes.js
</x-sencha-command>
</target>
</project>