forked from gwtproject/gwt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·230 lines (201 loc) · 9.87 KB
/
build.xml
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
<project name="GWT" default="dist" basedir=".">
<property name="gwt.root" location="."/>
<property name="project.tail" value=""/>
<import file="${gwt.root}/common.ant.xml"/>
<!-- "build" is the default when subprojects are directly targetted -->
<property name="target" value="build"/>
<property name="emma.merged.out" value="${project.build}/emma-coverage"/>
<!--
Convenience for the lateral calls we make. Use gwt.ant to
descend into another directory, and this to call in the same build.xml.
NOTE THE USE OF $TARGET, here and in common's gwt.ant. This has the
effect of dividing rules into subdirectory rules (using gwt.ant and
sensitive to $target) and action rules (using call-subproject and
setting $target)... but it is Bad for a subdirectory rule to depend
on another one, as they are both sensitive to $target, but you probably
mean that subdirB needed subdirA to be _built_, not $target'ed (tested,
etc.)
In other words, DO NOT USE DEPENDS=... IN A TARGET WITH GWT.ANT.
-->
<macrodef name="call-subproject">
<attribute name="subproject"/>
<attribute name="subtarget"/>
<sequential>
<antcall target="@{subproject}">
<param name="target" value="@{subtarget}"/>
</antcall>
</sequential>
</macrodef>
<property name="gwt.apicheck.config"
location="tools/api-checker/config/gwt211_212userapi.conf"/>
<property name="gwt.apicheck.referencelibs"
value="${gwt.tools}/api-checker-reference/2.11.0/gwt-dev-modified.jar:${gwt.tools}/api-checker-reference/2.11.0/gwt-user-modified.jar"/>
<target name="buildonly"
description="[action] Minimal one-platform devel build, without distro packaging">
<call-subproject subproject="dev" subtarget="build"/>
<call-subproject subproject="user" subtarget="build"/>
<call-subproject subproject="codeserver" subtarget="build"/>
<call-subproject subproject="requestfactory" subtarget="build"/>
<call-subproject subproject="servlet" subtarget="build"/>
</target>
<target name="dist" depends="build, doc" description="[action] Make all the distributions">
<gwt.ant dir="distro-source"/>
</target>
<target name="dist-dev" depends="buildonly"
description="[action] Make this platform's distribution, minus doc and samples">
<gwt.ant dir="distro-source" target="build"/>
</target>
<target name="dev" description="[subdir] Builds (or runs ${target} if set) all the dev libraries">
<call-subproject subproject="buildtools" subtarget="build"/>
<gwt.ant dir="dev"/>
</target>
<target name="codeserver"
description="[subdir] Builds (or runs ${target} if set) only the SuperDevMode">
<call-subproject subproject="dev" subtarget="build"/>
<gwt.ant dir="dev/codeserver"/>
</target>
<target name="user"
description="[subdir] Builds (or runs ${target} if set) only the user library">
<call-subproject subproject="dev" subtarget="build"/>
<gwt.ant dir="user"/>
</target>
<target name="tools" description="[subdir] Builds (or runs ${target} if set) only the tools">
<call-subproject subproject="user" subtarget="build"/>
<gwt.ant dir="tools"/>
</target>
<target name="requestfactory"
description="[subdir] Builds (or runs ${target} if set) only the requestfactory jars">
<call-subproject subproject="user" subtarget="build"/>
<gwt.ant dir="requestfactory"/>
</target>
<target name="servlet"
description="[subdir] Builds (or runs ${target} if set) only the servlet jar">
<call-subproject subproject="user" subtarget="build"/>
<gwt.ant dir="servlet"/>
</target>
<target name="doc" description="[subdir] Builds (or runs ${target} if set) the doc">
<call-subproject subproject="user" subtarget="build"/>
<gwt.ant dir="doc"/>
</target>
<target name="samples" description="[subdir] Builds (or runs ${target} if set) the samples">
<call-subproject subproject="user" subtarget="build"/>
<call-subproject subproject="codeserver" subtarget="build"/>
<gwt.ant dir="samples"/>
</target>
<target name="buildtools" description="[subdir] Build (or runs ${target} if set) the build tools">
<gwt.ant dir="build_tools"/>
</target>
<target name="build"
description="[action] Builds GWT, including samples, but without distro packaging">
<call-subproject subproject="dev" subtarget="build"/>
<call-subproject subproject="user" subtarget="build"/>
<call-subproject subproject="codeserver" subtarget="build"/>
<call-subproject subproject="requestfactory" subtarget="build"/>
<call-subproject subproject="servlet" subtarget="build"/>
<call-subproject subproject="tools" subtarget="build"/>
<call-subproject subproject="samples" subtarget="build"/>
</target>
<target name="checkstyle" description="[action] Does static analysis of GWT source">
<call-subproject subproject="buildtools" subtarget="checkstyle"/>
<call-subproject subproject="dev" subtarget="checkstyle"/>
<call-subproject subproject="user" subtarget="checkstyle"/>
<call-subproject subproject="codeserver" subtarget="checkstyle"/>
<call-subproject subproject="requestfactory" subtarget="checkstyle"/>
<call-subproject subproject="servlet" subtarget="checkstyle"/>
<!-- servlet needed for tools/benchmark-viewer -->
<call-subproject subproject="servlet" subtarget="build"/>
<call-subproject subproject="tools" subtarget="checkstyle"/>
<call-subproject subproject="samples" subtarget="checkstyle"/>
</target>
<target name="compile.tests" description="[action] Compile all the GWT tests, without running them">
<call-subproject subproject="buildtools" subtarget="compile.tests"/>
<call-subproject subproject="dev" subtarget="compile.tests"/>
<call-subproject subproject="user" subtarget="compile.tests"/>
<call-subproject subproject="codeserver" subtarget="compile.tests"/>
<call-subproject subproject="requestfactory" subtarget="compile.tests"/>
<call-subproject subproject="servlet" subtarget="compile.tests"/>
<call-subproject subproject="tools" subtarget="compile.tests"/>
</target>
<target name="test" depends="buildonly,apicheck,checkstyle"
description="[action] Runs all the GWT tests, including checkstyle and apicheck">
<call-subproject subproject="buildtools" subtarget="test"/>
<call-subproject subproject="dev" subtarget="test"/>
<call-subproject subproject="user" subtarget="test"/>
<call-subproject subproject="codeserver" subtarget="test"/>
<call-subproject subproject="requestfactory" subtarget="test"/>
<call-subproject subproject="servlet" subtarget="test"/>
<call-subproject subproject="tools" subtarget="test"/>
</target>
<target name="testrf" depends="buildonly"
description="[action] Runs the GWT RequestFactory tests">
<call-subproject subproject="dev" subtarget="compile.tests"/>
<call-subproject subproject="user" subtarget="compile.tests"/>
<call-subproject subproject="requestfactory" subtarget="test"/>
</target>
<path id="emma.classpath.src">
<pathelement location="${gwt.root}/user/src"/>
<pathelement location="${gwt.root}/dev/**/src/com/google"/>
<pathelement location="${gwt.root}/build_tools/**/src/com/google"/>
<pathelement location="${gwt.root}/tools/**/src/com/google"/>
</path>
<target name="emma.merge" description="Merges coverage data for all projects">
<delete dir="${emma.merged.out}"/>
<mkdir dir="${emma.merged.out}"/>
<emma>
<merge outfile="${emma.merged.out}/merged.emma">
<fileset dir="${project.build}">
<include name="**/*.emma"/>
<exclude name="**/merged.emma"/>
</fileset>
</merge>
</emma>
<emma>
<report sourcepath="${emma.classpath.src}">
<fileset dir="${project.build}">
<patternset>
<include name="**/metadata.emma"/>
</patternset>
</fileset>
<fileset file="${emma.merged.out}/merged.emma"/>
<txt outfile="${emma.merged.out}/coverage.txt"/>
<html outfile="${emma.merged.out}/coverage.html"/>
<xml outfile="${emma.merged.out}/coverage.xml"/>
</report>
</emma>
</target>
<target name="clean" description="[action] Cleans the entire GWT build">
<delete dir="${gwt.build}"/>
<delete file="${gwt.root}/doc/packages.properties"/>
</target>
<target name="presubmit"
description="[action] Deprecated for test, which now does checkstyle and apicheck"
depends="test">
</target>
<target name="apicheck-nobuild"
description="[action] Checks API compatibility to prior GWT revision">
<java failonerror="true" fork="true"
classname="com.google.gwt.tools.apichecker.ApiCompatibilityChecker">
<jvmarg line="-Xmx512m"/>
<classpath>
<pathelement location="${gwt.build.out}/tools/api-checker/bin"/>
<fileset dir="${gwt.build.lib}" includes="gwt-user.jar,gwt-dev.jar"/>
<pathelement path="${java.class.path}"/>
<pathelement location="${gwt.tools.lib}/apache/ant-zipscanner/ant-zipscanner-1.6.5-1-rebased.jar"/>
<pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar"/>
<pathelement
location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final.jar"/>
</classpath>
<arg value="-refJar"/>
<arg path="${gwt.apicheck.referencelibs}"/>
<arg value="-configFile"/>
<arg file="${gwt.apicheck.config}"/>
<arg value="-logLevel"/>
<arg value="ERROR"/>
<!-- Needed for checking types that include validation APIs -->
<arg value="-validationSourceJars"/>
<arg path="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar"/>
</java>
</target>
<target name="apicheck" depends="buildonly,tools,apicheck-nobuild"
description="[action] Builds GWT and checks API compatiblity to prior release"/>
</project>