]> git.proxmox.com Git - extjs.git/blob - extjs/packages/charts/.sencha/package/init-impl.xml
add extjs 6.0.1 sources
[extjs.git] / extjs / packages / charts / .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 <and>
133 <not>
134 <available file="${package.examples.dir}" type="dir"/>
135 </not>
136 <not>
137 <isset property="package.example.path"/>
138 </not>
139 </and>
140 <then>
141 <property name="skip.examples" value="1"/>
142 </then>
143 </if>
144
145 <!--
146 See if there is a ./packages subfolder full of packages. This is only allowed
147 for framework packages.
148 -->
149 <if>
150 <not>
151 <and>
152 <or>
153 <equals arg1="${package.type}" arg2="framework"/>
154 <equals arg1="${package.type}" arg2="toolkit"/>
155 </or>
156 <available file="${package.subpkgs.dir}" type="dir"/>
157 </and>
158 </not>
159 <then>
160 <property name="skip.subpkgs" value="1"/>
161 </then>
162 </if>
163
164 <if>
165 <not>
166 <isset property="package.framework"/>
167 </not>
168 <then>
169 <property name="skip.style" value="1"/>
170 </then>
171 </if>
172
173 <if>
174 <isset property="skip.style"/>
175 <then>
176 <property name="skip.sass" value="1"/>
177 <property name="skip.capture" value="1"/>
178 <property name="skip.slice" value="1"/>
179 </then>
180 </if>
181
182 <if>
183 <not>
184 <isset property="package.base.names"/>
185 </not>
186 <then>
187 <property name="skip.inherit" value="1"/>
188 </then>
189 </if>
190
191 <!--
192 this id string is used to share a common compiler instance
193 for all x-compile calls in this project
194 -->
195 <property name="compiler.ref.id" value="package-compiler"/>
196
197 <fileset id="pkg.files"
198 dir="${package.dir}"
199 includes="${pkg.includes}"
200 excludes="${pkg.excludes}">
201 <exclude name="**/.sass-cache/**/*"/>
202 <exclude name="**/.sass-cache"/>
203 <exclude name="**/theme-capture.*"/>
204 </fileset>
205
206
207 <if>
208 <isset property="package.toolkit"/>
209 <then>
210 <property name="package.sass.fashion" value="true"/>
211 </then>
212 </if>
213
214 <property name="package.sass.fashion" value="false"/>
215 <property name="package.sass.rhino" value="false"/>
216 <property name="package.sass.dynamic" value="false"/>
217
218 <!--
219 this property is set indicating we've reached the end of the
220 core init phase. it's presence will indicate that we've already
221 executed this target, and will bypass firing the init code
222 repeatedly in sub projects (antcall, x-ant-call)
223 See the above 'unless' attribute on the -init target
224 -->
225 <property name="internal.x-sencha-initialized" value="true"/>
226 </target>
227 <target name="-after-init"/>
228
229 <target name="-before-init-defaults"/>
230 <target name="-init-defaults">
231 <!--
232 This property can be modified to change general build options
233 such as excluding files from the set. The format expects newlines
234 for each argument, for example:
235
236 <property name="build.operations"/>
237 exclude
238 -namespace=Ext
239 </property>
240 -->
241 <property name="build.operations" value=""/>
242
243 <!--
244 This property can be modified to change concatenation
245 specific options
246
247 -strip-comments: comment suppression
248 -remove-text-references: transform string literal class references to objects
249 -beautify: unpack the source
250
251 <property name="build.concat.options"/>
252 -strip-comments
253 -remove-text-references
254 -beautify
255 </property>
256 -->
257 <property name="build.concat.options" value=""/>
258 <property name="build.concat.debug.options" value=""/>
259
260 <property name="build.pkg.manifest" value="pkg.files"/>
261 </target>
262 <target name="-after-init-defaults"/>
263
264 <!--
265 Initializes the compiler instances, reading in the app.json and package.json
266 definitions, as well as scanning and parsing all js files found on the
267 various classpath entries for the framework, workspace, packages, and app
268 -->
269 <target name="-init-compiler" depends="-init">
270 <x-compile refid="${compiler.ref.id}"
271 dir="${package.dir}"
272 initOnly="true"
273 inheritAll="true">
274 <![CDATA[
275 # base build command
276 -tempDir=${build.compile.temp.dir}
277 -keepTempDir=${build.compile.temp.dir.keep}
278 include
279 -all
280 and
281 save
282 package-${package.name}-all
283 ]]>
284 </x-compile>
285 </target>
286
287 <target name="-init-web-server">
288 <x-server port="${build.web.port}"
289 portPropertyName="build.web.port"
290 defaultSassFile="${package.example.scss}"
291 defaultCssFile="${package.example.css}"
292 refid="package.web.server">
293 <mapping name="~cmd" path="${cmd.dir}"/>
294 <mapping name="" path="${build.web.root}"/>
295 </x-server>
296 <x-echo>Package web server available at http://localhost:${build.web.port}</x-echo>
297 </target>
298
299 </project>