]> git.proxmox.com Git - extjs.git/blob - extjs/modern/theme-device-base/.sencha/package/init-impl.xml
add extjs 6.0.1 sources
[extjs.git] / extjs / modern / theme-device-base / .sencha / package / init-impl.xml
1 <project name="x-init-impl">
2 <!--
3 Init-Local
4 -->
5 <target name="-before-init-local"/>
6 <target name="-init-local">
7 <!--
8 ${basedir} is actually the basedir of build.xml, in the app root
9 so this imports ${app.dir}/local.properties, if present
10 -->
11 <property file="${basedir}/local.properties"/>
12
13 <!--
14 This will traverse upwards in the file system, starting at the
15 app root directory, looking for the workspace. Once found,
16 ${workspace.dir}/local.properties will be imported into this
17 project
18 -->
19 <script language="javascript">
20 <![CDATA[
21 var f = new java.io.File(project.getProperty("basedir"));
22 var sub = ".sencha/workspace/sencha.cfg";
23
24 for (var p = f; p; p = p.getParentFile()) {
25 var t = new java.io.File(p, sub);
26 if (t.exists()) {
27 // we found the workspace folder!
28
29 t = new java.io.File(p, "local.properties");
30 if (t.exists()) {
31 var loader = project.createTask("property");
32 loader.setFile(new java.io.File(t.getCanonicalPath()));
33 loader.execute();
34 }
35
36 break;
37 }
38 }
39 ]]>
40 </script>
41
42 </target>
43 <target name="-after-init-local"/>
44 <target name="init-local"
45 depends="-before-init-local,-init-local,-after-init-local"/>
46
47 <!--
48 Apply Version
49 -->
50 <target name="-before-apply-version"/>
51 <target name="-after-apply-version"/>
52 <target name="apply-version" if="build.version">
53 <echo>Switch package version to ${build.version}</echo>
54 <antcall target="-before-apply-version"/>
55
56 <x-set-json-version file="${basedir}/package.json"
57 version="${build.version}"/>
58
59 <antcall target="-after-apply-version"/>
60 </target>
61
62 <target name="-before-init"/>
63 <target name="-init" unless="internal.x-sencha-initialized">
64 <antcall target="apply-version"/>
65
66 <!--
67 Now, apply various project updates, such as ant class loader path
68 updates, as well as loading Sencha Cmd config system properties
69 into ant property space
70 -->
71 <x-sencha-init prefix=""/>
72
73 <!--
74 default the build environment to production if it is unset by this point
75 -->
76 <property name="build.environment" value="production"/>
77 <property name="CR" value="&#10;"/>
78 <property name="build.version" value="${package.version}"/>
79
80 <x-load-properties>
81 <file path="${package.config.dir}/${build.environment}.properties" required="false"/>
82 <file path="${package.config.dir}/build.properties" required="false"/>
83 <file path="${package.config.dir}/defaults.properties" required="true"/>
84 </x-load-properties>
85
86 <!--
87 See if there is a ./resources subfolder
88 -->
89 <if>
90 <not>
91 <available file="${package.resources.dir}" type="dir"/>
92 </not>
93 <then>
94 <property name="skip.resources" value="1"/>
95 <property name="skip.slice" value="1"/>
96 </then>
97 </if>
98
99
100 <!--
101 See if there is a ./sass subfolder
102 -->
103 <if>
104 <not>
105 <available file="${package.sass.dir}" type="dir"/>
106 </not>
107 <then>
108 <property name="skip.sass" value="1"/>
109 </then>
110 </if>
111
112 <!--
113 Slicing operations are not needed when using the touch framework
114 or for non-theme packages
115 -->
116 <if>
117 <or>
118 <not>
119 <equals arg1="theme" arg2="${package.type}"/>
120 </not>
121 <equals arg1="touch" arg2="${framework.name}"/>
122 </or>
123 <then>
124 <property name="skip.slice" value="1"/>
125 </then>
126 </if>
127
128 <!--
129 See if there is an ./examples subfolder full of example applications.
130 -->
131 <if>
132 <not>
133 <available file="${package.examples.dir}" type="dir"/>
134 </not>
135 <then>
136 <property name="skip.examples" value="1"/>
137 </then>
138 </if>
139
140 <!--
141 See if there is a ./packages subfolder full of packages. This is only allowed
142 for framework packages.
143 -->
144 <if>
145 <not>
146 <and>
147 <or>
148 <equals arg1="${package.type}" arg2="framework"/>
149 <equals arg1="${package.type}" arg2="toolkit"/>
150 </or>
151 <available file="${package.subpkgs.dir}" type="dir"/>
152 </and>
153 </not>
154 <then>
155 <property name="skip.subpkgs" value="1"/>
156 </then>
157 </if>
158
159 <if>
160 <not>
161 <isset property="package.framework"/>
162 </not>
163 <then>
164 <property name="skip.style" value="1"/>
165 </then>
166 </if>
167
168 <if>
169 <isset property="skip.style"/>
170 <then>
171 <property name="skip.sass" value="1"/>
172 <property name="skip.capture" value="1"/>
173 <property name="skip.slice" value="1"/>
174 </then>
175 </if>
176
177 <if>
178 <not>
179 <isset property="package.base.names"/>
180 </not>
181 <then>
182 <property name="skip.inherit" value="1"/>
183 </then>
184 </if>
185
186 <!--
187 this id string is used to share a common compiler instance
188 for all x-compile calls in this project
189 -->
190 <property name="compiler.ref.id" value="package-compiler"/>
191
192 <fileset id="pkg.files"
193 dir="${package.dir}"
194 includes="${pkg.includes}"
195 excludes="${pkg.excludes}">
196 <exclude name="**/.sass-cache/**/*"/>
197 <exclude name="**/.sass-cache"/>
198 <exclude name="**/theme-capture.*"/>
199 </fileset>
200
201
202 <if>
203 <isset property="package.toolkit"/>
204 <then>
205 <property name="package.sass.fashion" value="true"/>
206 </then>
207 </if>
208
209 <property name="package.sass.fashion" value="false"/>
210 <property name="package.sass.rhino" value="false"/>
211 <property name="package.sass.dynamic" value="false"/>
212
213 <!--
214 this property is set indicating we've reached the end of the
215 core init phase. it's presence will indicate that we've already
216 executed this target, and will bypass firing the init code
217 repeatedly in sub projects (antcall, x-ant-call)
218 See the above 'unless' attribute on the -init target
219 -->
220 <property name="internal.x-sencha-initialized" value="true"/>
221 </target>
222 <target name="-after-init"/>
223
224 <target name="-before-init-defaults"/>
225 <target name="-init-defaults">
226 <!--
227 This property can be modified to change general build options
228 such as excluding files from the set. The format expects newlines
229 for each argument, for example:
230
231 <property name="build.operations"/>
232 exclude
233 -namespace=Ext
234 </property>
235 -->
236 <property name="build.operations" value=""/>
237
238 <!--
239 This property can be modified to change concatenation
240 specific options
241
242 -strip-comments: comment suppression
243 -remove-text-references: transform string literal class references to objects
244 -beautify: unpack the source
245
246 <property name="build.concat.options"/>
247 -strip-comments
248 -remove-text-references
249 -beautify
250 </property>
251 -->
252 <property name="build.concat.options" value=""/>
253 <property name="build.concat.debug.options" value=""/>
254
255 <property name="build.pkg.manifest" value="pkg.files"/>
256 </target>
257 <target name="-after-init-defaults"/>
258
259 <!--
260 Initializes the compiler instances, reading in the app.json and package.json
261 definitions, as well as scanning and parsing all js files found on the
262 various classpath entries for the framework, workspace, packages, and app
263 -->
264 <target name="-init-compiler" depends="-init">
265 <x-compile refid="${compiler.ref.id}"
266 dir="${package.dir}"
267 initOnly="true"
268 inheritAll="true">
269 <![CDATA[
270 # base build command
271 -tempDir=${build.compile.temp.dir}
272 -keepTempDir=${build.compile.temp.dir.keep}
273 include
274 -all
275 and
276 save
277 package-${package.name}-all
278 ]]>
279 </x-compile>
280 </target>
281
282 <target name="-init-web-server">
283 <x-server port="${build.web.port}"
284 portPropertyName="build.web.port"
285 defaultSassFile="${package.example.scss}"
286 defaultCssFile="${package.example.css}"
287 refid="package.web.server">
288 <mapping name="~cmd" path="${cmd.dir}"/>
289 <mapping name="" path="${build.web.root}"/>
290 </x-server>
291 <x-echo>Package web server available at http://localhost:${build.web.port}</x-echo>
292 </target>
293
294 </project>