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