-
Notifications
You must be signed in to change notification settings - Fork 82
/
build.xml
172 lines (153 loc) · 6.21 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
<project name="extjs" default="build" basedir=".">
<target name="init-antcontrib">
<taskdef resource="net/sf/antcontrib/antlib.xml">
<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"/>
</target>
<target name="build" depends="init-sencha-cmd">
<property name="build.dir" location="${basedir}"/>
<!--
Produce base concatenation for standard distribution files
-->
<x-sencha-command>
compile
--ignore=diag
--options=debug:true
concatenate
-out=${build.dir}/ext-all-dev.js
and
concatenate
-sandbox=Ext4:x4-
-out=${build.dir}/builds/ext-all-sandbox-dev.js
and
union
-tag=core
and
concatenate
-out=${build.dir}/ext-dev.js
and
concatenate
-out=${build.dir}/builds/ext-core-dev.js
and
union
-tag=foundation
and
concatenate
-out=${build.dir}/builds/ext-foundation-dev.js
and
include
-all
and
--options=debug:false
concatenate
-out=${build.dir}/ext-all-debug-w-comments.js
and
concatenate
-sandbox=Ext4:x4-
-out=${build.dir}/builds/ext-all-sandbox-debug-w-comments.js
and
union
-tag=core
and
concatenate
-out=${build.dir}/ext-debug-w-comments.js
and
concatenate
-out=${build.dir}/builds/ext-core-debug-w-comments.js
and
union
-tag=foundation
and
concatenate
-out=${build.dir}/builds/ext-foundation-debug-w-comments.js
and
union
-not
-tag=${build.dir}/core
and
metadata
+append
+alternates
-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-debug-w-comments.js
and
metadata
+append
+alias
--base-path=${build.dir}
--output-file=${build.dir}/ext-dev.js
</x-sencha-command>
<loadfile property="header.text" srcfile="${build.dir}/license.txt"/>
<property name="header.comment" value="/* ${header.text} */ "/>
<!--
Strip comments from uncompressed builds
-->
<x-strip-js srcfile="${build.dir}/ext-all-debug-w-comments.js"
outfile="${build.dir}/ext-all-debug.js"/>
<x-strip-js srcfile="${build.dir}/ext-debug-w-comments.js"
outfile="${build.dir}/ext-debug.js"/>
<x-strip-js srcfile="${build.dir}/builds/ext-core-debug-w-comments.js"
outfile="${build.dir}/builds/ext-core-debug.js"/>
<x-strip-js srcfile="${build.dir}/builds/ext-foundation-debug-w-comments.js"
outfile="${build.dir}/builds/ext-foundation-debug.js"/>
<x-strip-js srcfile="${build.dir}/builds/ext-all-sandbox-debug-w-comments.js"
outfile="${build.dir}/builds/ext-all-sandbox-debug.js"/>
<!--
Apply yui compressor
-->
<x-compress-js
srcfile="${build.dir}/ext-all-debug.js"
outfile="${build.dir}/ext-all.js"/>
<x-compress-js
srcfile="${build.dir}/ext-debug.js"
outfile="${build.dir}/ext.js"/>
<x-compress-js
srcfile="${build.dir}/builds/ext-core-debug.js"
outfile="${build.dir}/builds/ext-core.js"/>
<x-compress-js
srcfile="${build.dir}/builds/ext-foundation-debug.js"
outfile="${build.dir}/builds/ext-foundation.js"/>
<x-compress-js
srcfile="${build.dir}/builds/ext-all-sandbox-debug.js"
outfile="${build.dir}/builds/ext-all-sandbox.js"/>
<!--
Add license headers
-->
<for param="file">
<path>
<fileset dir="${build.dir}" includes="*.js"/>
<fileset dir="${build.dir}/builds" includes="*.js"/>
</path>
<sequential>
<move file="@{file}" tofile="@{file}.tmp"/>
<concat destfile="@{file}">
<header>${header.comment}</header>
<fileset file="@{file}.tmp"/>
</concat>
<delete file="@{file}.tmp"/>
</sequential>
</for>
</target>
</project>