]> git.proxmox.com Git - extjs.git/blob - extjs/classic/touch-sizing/.sencha/package/sub-builds.xml
add extjs 6.0.1 sources
[extjs.git] / extjs / classic / touch-sizing / .sencha / package / sub-builds.xml
1 <project name="x-sub-builds-impl">
2
3 <macrodef name="x-process-sub-packages">
4 <attribute name="all" default="false"/>
5 <element name="tasks" implicit="true"/>
6 <sequential>
7 <if>
8 <and>
9 <isset property="package.subpkgs.dir"/>
10 <available file="${package.subpkgs.dir}" type="dir"/>
11 </and>
12 <then>
13 <local name="sub.packages.list"/>
14 <condition property="sub.packages.list" value="${package.subpkgs}">
15 <and>
16 <isset property="package.subpkgs"/>
17 <equals arg1="@{all}" arg2="false"/>
18 </and>
19 </condition>
20 <property name="sub.packages.list" value="*"/>
21 <for param="pkg-dir">
22 <dirset dir="${package.subpkgs.dir}" includes="${sub.packages.list}"/>
23 <sequential>
24 <if>
25 <available file="@{pkg-dir}/.sencha/package/sencha.cfg"/>
26 <then>
27 <tasks/>
28 </then>
29 </if>
30 </sequential>
31 </for>
32 </then>
33 </if>
34 </sequential>
35 </macrodef>
36
37 <macrodef name="x-process-examples">
38 <attribute name="all" default="false"/>
39 <element name="tasks" implicit="true"/>
40 <sequential>
41 <if>
42 <and>
43 <isset property="package.examples.dir"/>
44 <available file="${package.examples.dir}" type="dir"/>
45 </and>
46 <then>
47 <local name="example.list"/>
48 <condition property="example.list" value="${package.examples}">
49 <and>
50 <isset property="package.examples"/>
51 <equals arg1="@{all}" arg2="false"/>
52 </and>
53 </condition>
54 <property name="example.list" value="*"/>
55 <for param="example-dir">
56 <dirset dir="${package.examples.dir}" includes="${example.list}"/>
57 <sequential>
58 <if>
59 <available file="@{example-dir}/.sencha/app/sencha.cfg"/>
60 <then>
61 <tasks/>
62 </then>
63 </if>
64 </sequential>
65 </for>
66 </then>
67 </if>
68 </sequential>
69 </macrodef>
70
71 <macrodef name="x-run-sub-build">
72 <attribute name="dir"/>
73 <attribute name="target"/>
74 <element name="properties" implicit="true"/>
75 <sequential>
76 <if>
77 <available file="@{dir}/build.xml"/>
78 <then>
79 <local name="sub.name"/>
80 <basename file="@{dir}"
81 property="sub.name"/>
82 <ant dir="@{dir}"
83 inheritall="false"
84 inheritrefs="true"
85 target="@{target}">
86 <property name="compiler.ref.id"
87 value="compiler-${sub.name}"/>
88 <properties/>
89 </ant>
90 </then>
91 </if>
92 </sequential>
93 </macrodef>
94
95 <macrodef name="x-sub-build">
96 <attribute name="dir"/>
97 <attribute name="target" default="build"/>
98 <attribute name="inherit-version" default="0"/>
99 <sequential>
100 <if>
101 <x-is-true value="@{inherit-version}"/>
102 <then>
103 <x-run-sub-build dir="@{dir}" target="@{target}">
104 <property name="cmd.dir" value="${cmd.dir}"/>
105 <property name="build.version" value="${build.version}"/>
106 </x-run-sub-build>
107 </then>
108 <else>
109 <x-run-sub-build dir="@{dir}" target="@{target}">
110 <property name="cmd.dir" value="${cmd.dir}"/>
111 </x-run-sub-build>
112 </else>
113 </if>
114 </sequential>
115 </macrodef>
116
117 <target name="-before-subpkgs"/>
118 <target name="-after-subpkgs"/>
119 <target name="-subpkgs">
120 <x-process-sub-packages>
121 <local name="sub.name"/>
122 <basename file="@{dir}"
123 property="sub.name"/>
124 <if>
125 <x-is-true value="${build.subpkgs.inherit.version}"/>
126 <then>
127 <x-sencha-command dir="@{pkg-dir}" inheritall="false">
128 <property name="compiler.ref.id" value="compiler-${sub.name}"/>
129 <property name="build.version" value="${build.version}"/>
130 package
131 build
132 </x-sencha-command>
133 </then>
134 <else>
135 <x-sencha-command dir="@{pkg-dir}" inheritall="false">
136 <property name="compiler.ref.id" value="compiler-${sub.name}"/>
137 package
138 build
139 </x-sencha-command>
140 </else>
141 </if>
142 </x-process-sub-packages>
143 </target>
144
145 <target name="-before-clean-subpkgs"/>
146 <target name="-after-clean-subpkgs"/>
147 <target name="-clean-subpkgs">
148 <x-process-sub-packages>
149 <x-sub-build dir="@{pkg-dir}"
150 target="clean"
151 inherit-version="${build.subpkgs.inherit.version}"/>
152 </x-process-sub-packages>
153 </target>
154
155 <target name="-before-upgrade-subpkgs"/>
156 <target name="-after-upgrade-subpkgs"/>
157 <target name="-upgrade-subpkgs">
158 <x-process-sub-packages all="true">
159 <x-sencha-command dir="@{pkg-dir}" inheritall="false">
160 <property name="args.force" value="true"/>
161 package
162 upgrade
163 </x-sencha-command>
164 <delete dir="@{example-dir}/.sencha_backup"/>
165 </x-process-sub-packages>
166 </target>
167
168 <target name="-before-examples"/>
169 <target name="-after-examples"/>
170 <target name="-examples">
171 <x-process-examples>
172 <echo>Building example in @{example-dir}</echo>
173 <x-sencha-command dir="@{example-dir}" inheritall="false">
174 app
175 build
176 </x-sencha-command>
177 </x-process-examples>
178 </target>
179
180 <target name="-before-upgrade-examples"/>
181 <target name="-after-upgrade-examples"/>
182 <target name="-upgrade-examples">
183 <x-process-examples all="true">
184 <echo>Upgrading example in @{example-dir}</echo>
185 <x-sencha-command dir="@{example-dir}" inheritall="false">
186 <property name="args.force" value="true"/>
187 app
188 upgrade
189 </x-sencha-command>
190 <delete dir="@{example-dir}/.sencha_backup"/>
191 </x-process-examples>
192 </target>
193
194 <target name="-before-clean-examples"/>
195 <target name="-after-clean-examples"/>
196 <target name="-clean-examples">
197 <x-process-examples all="true">
198 <echo>Cleaning example in @{example-dir}</echo>
199 <x-sub-build dir="@{example-dir}"
200 target="clean"/>
201 </x-process-examples>
202 </target>
203
204 </project>