-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbuild.xml
More file actions
285 lines (240 loc) · 10.2 KB
/
Copy pathbuild.xml
File metadata and controls
285 lines (240 loc) · 10.2 KB
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<project name="gwt-traction" default="dist">
<!-- "build" is the default gwt-traction target -->
<property name="project.target" value="build" />
<!-- find the built gwt-traction.jar -->
<path id="gwt-traction.jar.id">
<fileset dir="target">
<include name="gwt-traction-*-SNAPSHOT.jar"/>
</fileset>
</path>
<property name="gwt-traction.jar" refid="gwt-traction.jar.id"/>
<!-- Set up initial environment -->
<property name="project.root" location="." />
<property name="project.build.properties" value="${project.root}/build.properties" />
<property environment="env" />
<property file="${project.build.properties}" />
<!-- Also check for global-gwt-traction.properties in the directory above -->
<property file="${project.root}/../global-gwt-traction.properties" />
<!-- import common config -->
<import file="${project.root}/common.ant.xml" />
<available file="${gwt.tools}" type="dir" property="gwt.tools.exists" />
<!-- Setting up the project bin -->
<property name="project.bin" value="${project.build}/bin" />
<!-- Javadoc -->
<property name="project.javadoc" location="${project.out}/javadoc" />
<!-- GWT demo creation properties -->
<property name="demo.src.dir" value="${project.root}/src-demo" />
<property name="demo.out.dir" value="${project.out}/compiled-demos" />
<property name="demo.js.style" value="OBFUSCATED" />
<property name="demo.filter" value="**/demo/**/*.gwt.xml" />
<target name="help" description="Short description of gwt-traction properties and tasks">
<echo>
gwt-traction properties
gwt.home
The location of the GWT jars you wish to compile and run against.
gwt.tools
The location of your GWT tools dir.
gwt-traction.jar
Where should the gwt-traction jar be found.
project.build.properties
Where you have defined the above propeties.
gwt-traction tasks
The gwt-traction tasks are self-documenting. The list of public ones are
build,help,dist,clean,all.
</echo>
</target>
<target name="classpath">
<echo>export CLASSPATH=src-demo:${gwt-traction.jar}:${gwt.user.jar}:${gwt.dev.jar}:${gwt.validation.api.jar}:${gwt.validation.api.sources.jar}</echo>
</target>
<target name="dist"
depends="checksetup, compile, build.demos"
description="Assembles the full gwt-traction distribution.">
<mkdir dir="${project.out}" />
<mkdir dir="${project.demos}" />
<mkdir dir="${project.bin}" />
<javac srcdir="${project.root}/src-demo"
destdir="${project.bin}"
debug="${javac.debug}"
debuglevel="${javac.debuglevel}"
source="${javac.source}"
target="${javac.target}"
nowarn="${javac.nowarn}"
encoding="${javac.encoding}">
<classpath>
<pathelement location="${gwt-traction.jar}" />
<pathelement location="${gwt.user.jar}" />
<pathelement location="${gwt.validation.api.jar}" />
<pathelement location="${gwt.validation.api.sources.jar}" />
<pathelement location="${gwt.dev.jar}" />
</classpath>
</javac>
<jar destfile="${project.demos}/gwt-traction-demos.jar">
<fileset dir="${project.root}/src-demo">
<include name="**/demo/**" />
</fileset>
</jar>
<copy todir="${project.root}/gh-pages/demo">
<fileset dir="${demo.out.dir}">
</fileset>
</copy>
</target>
<target name="clean" description="Cleans intermediate and output files">
<delete dir="${project.build}" />
</target>
<target name="all"
description="Cleans, builds, and packages gwt-traction"
depends="clean,dist" />
<!-- helper tasks -->
<target name="checksetup">
<fail message="unknown platform" unless="gwt.platform" />
<fail message="mvn package first" unless="gwt-traction.jar" />
<echo message="gwt.home = ${gwt.home}" />
<echo message="gwt.tools = ${gwt.tools}" />
<echo message="gwt.platform = ${gwt.platform}" />
<echo message="gwt-traction.jar = ${gwt-traction.jar}" />
</target>
<!-- Compile the project -->
<target name="compile">
<mkdir dir="${project.bin}" />
<echo message="Compiling source..." />
<gwt.javac destdir="${project.bin}">
<classpath>
<pathelement location="${gwt.user.jar}" />
<pathelement location="${gwt.validation.api.jar}" />
<pathelement location="${gwt.validation.api.sources.jar}" />
<pathelement location="${gwt.dev.jar}" />
</classpath>
</gwt.javac>
</target>
<target name="gwtc">
<!-- convert from module file path to module name -->
<propertyregex property="gwtc.module.name"
input="${gwtc.module.file}"
regexp="${gwtc.src.dir}[/\\](.*)\.gwt\.xml"
select="\1"
casesensitive="false" />
<propertyregex property="gwtc.module.name"
input="${gwtc.module.name}"
override="true"
global="true"
regexp="[/\\]"
replace="\." />
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<jvmarg value="-Xmx512m" />
<arg value="-war" />
<arg value="${gwtc.out.dir}" />
<arg value="-style" />
<arg value="${gwtc.js.style}" />
<arg value="-strict" />
<arg value="${gwtc.module.name}" />
<classpath>
<path path="${gwtc.src.dir}" />
<path path="${gwt-traction.jar}" />
<pathelement location="${gwt.user.jar}" />
<pathelement location="${gwt.validation.api.jar}" />
<pathelement location="${gwt.validation.api.sources.jar}" />
<pathelement location="${gwt.dev.jar}" />
</classpath>
</java>
</target>
<target name="build.demo.helper" depends="gwtc">
<concat destfile="${gwtc.out.dir}/index.html" append="true">
<filterchain>
<replaceregex flags="g" pattern="\\" replace="/" />
<replaceregex pattern="\('.*/src-demo/" replace="('" />
</filterchain>
<script>writeDemoLink('${gwtc.module.file}');</script>
</concat>
</target>
<target name="clean.demos">
<delete dir="${demo.out.dir}" />
</target>
<target name="build.demos" depends="clean.demos, build.demos.body" />
<target name="build.demos.body">
<delete dir="${demo.out.dir}" />
<copy file="demoindex.template" tofile="${demo.out.dir}/index.html" />
<foreach target="build.demo.helper" param="gwtc.module.file">
<param name="gwtc.src.dir" value="${demo.src.dir}" />
<param name="gwtc.out.dir" value="${demo.out.dir}" />
<param name="gwtc.js.style" value="${demo.js.style}" />
<path>
<fileset dir="src-demo">
<include name="${demo.filter}" />
</fileset>
</path>
</foreach>
</target>
<target name="dev.color" description="Run ColorDemo">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.DevMode">
<classpath>
<pathelement location="${gwt-traction.jar}" />
<pathelement location="${project.class.path}" />
<pathelement location="${project.src}" />
<pathelement location="${demo.src.dir}" />
<pathelement location="${gwt.user.jar}" />
<pathelement location="${gwt.validation.api.jar}" />
<pathelement location="${gwt.validation.api.sources.jar}" />
<pathelement location="${gwt.dev.jar}" />
</classpath>
<jvmarg value="-Xmx512M" />
<jvmarg value="-Xdebug" />
<arg value="-startupUrl" />
<arg value="http://localhost:8888/com.tractionsoftware.gwt.demo.color.ColorDemo/ColorDemo.html" />
<arg value="-war" />
<arg value="." />
<arg value="-logLevel" />
<arg value="DEBUG" />
<arg value="-bindAddress" />
<arg value="192.168.46.1" />
<arg value="com.tractionsoftware.gwt.demo.color.ColorDemo" />
</java>
</target>
<target name="dev.autosize" description="Run AutoSizingTextAreaDemo">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.DevMode">
<classpath>
<pathelement location="${gwt-traction.jar}" />
<pathelement location="${project.class.path}" />
<pathelement location="${project.src}" />
<pathelement location="${demo.src.dir}" />
<pathelement location="${gwt.user.jar}" />
<pathelement location="${gwt.validation.api.jar}" />
<pathelement location="${gwt.validation.api.sources.jar}" />
<pathelement location="${gwt.dev.jar}" />
</classpath>
<jvmarg value="-Xmx512M" />
<jvmarg value="-Xdebug" />
<arg value="-startupUrl" />
<arg value="http://localhost:8888/com.tractionsoftware.gwt.demo.autosizingtextarea.AutoSizingTextAreaDemo/AutoSizingTextAreaDemo.html" />
<arg value="-war" />
<arg value="." />
<arg value="-logLevel" />
<arg value="DEBUG" />
<arg value="-bindAddress" />
<arg value="192.168.46.1" />
<arg value="com.tractionsoftware.gwt.demo.autosizingtextarea.AutoSizingTextAreaDemo" />
</java>
</target>
<target name="dev.dialog" description="Run TractionDialogBox">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.DevMode">
<classpath>
<pathelement location="${gwt-traction.jar}" />
<pathelement location="${project.class.path}" />
<pathelement location="${project.src}" />
<pathelement location="${demo.src.dir}" />
<pathelement location="${gwt.user.jar}" />
<pathelement location="${gwt.validation.api.jar}" />
<pathelement location="${gwt.validation.api.sources.jar}" />
<pathelement location="${gwt.dev.jar}" />
</classpath>
<jvmarg value="-Xmx512M" />
<jvmarg value="-Xdebug" />
<arg value="-startupUrl" />
<arg value="http://localhost:8888/com.tractionsoftware.gwt.demo.dialogbox.DialogBoxDemo/DialogBoxDemo.html" />
<arg value="-war" />
<arg value="." />
<arg value="-logLevel" />
<arg value="DEBUG" />
<arg value="com.tractionsoftware.gwt.demo.dialogbox.DialogBoxDemo" />
</java>
</target>
</project>