blob: 49bf3b93e2c2b6b655dcc16dd915e080e0cb211b [file] [log] [blame]
fabbott@google.com71e72af2009-06-13 02:28:21 +00001<project name="GWT" default="dist" basedir=".">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -07002 <property name="gwt.root" location="."/>
3 <property name="project.tail" value=""/>
4 <import file="${gwt.root}/common.ant.xml"/>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +00005
fabbott@google.com0e2dc6282008-08-22 16:09:01 +00006 <!-- "build" is the default when subprojects are directly targetted -->
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -07007 <property name="target" value="build"/>
8 <property name="emma.merged.out" value="${project.build}/emma-coverage"/>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +00009
Roberto Lublinerman299dd2f2014-02-12 13:01:21 -080010 <!--
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000011 Convenience for the lateral calls we make. Use gwt.ant to
12 descend into another directory, and this to call in the same build.xml.
13 NOTE THE USE OF $TARGET, here and in common's gwt.ant. This has the
14 effect of dividing rules into subdirectory rules (using gwt.ant and
15 sensitive to $target) and action rules (using call-subproject and
16 setting $target)... but it is Bad for a subdirectory rule to depend
17 on another one, as they are both sensitive to $target, but you probably
18 mean that subdirB needed subdirA to be _built_, not $target'ed (tested,
19 etc.)
20
Roberto Lublinerman299dd2f2014-02-12 13:01:21 -080021 In other words, DO NOT USE DEPENDS=... IN A TARGET WITH GWT.ANT.
fabbott@google.com71e72af2009-06-13 02:28:21 +000022 -->
23 <macrodef name="call-subproject">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070024 <attribute name="subproject"/>
25 <attribute name="subtarget"/>
fabbott@google.com71e72af2009-06-13 02:28:21 +000026 <sequential>
27 <antcall target="@{subproject}">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070028 <param name="target" value="@{subtarget}"/>
fabbott@google.com71e72af2009-06-13 02:28:21 +000029 </antcall>
30 </sequential>
31 </macrodef>
32
Roberto Lublinerman299dd2f2014-02-12 13:01:21 -080033 <property name="gwt.apicheck.config"
Goktug Gokdoganf5a01972014-12-10 21:17:25 -080034 location="tools/api-checker/config/gwt27_28userApi.conf"/>
Thomas Broyerc481a532013-05-22 11:36:50 +020035 <property name="gwt.apicheck.referencelibs"
Goktug Gokdoganf5a01972014-12-10 21:17:25 -080036 value="${gwt.tools}/api-checker-reference/2.7.0/gwt-dev-modified.jar:${gwt.tools}/api-checker-reference/2.7.0/gwt-user-modified.jar"/>
fabbott@google.com831b44c2008-04-28 15:22:02 +000037
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000038 <target name="buildonly"
39 description="[action] Minimal one-platform devel build, without distro packaging">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070040 <call-subproject subproject="dev" subtarget="build"/>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070041 <call-subproject subproject="user" subtarget="build"/>
John Stalcup22ab7742014-10-01 12:40:50 -070042 <call-subproject subproject="codeserver" subtarget="build"/>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070043 <call-subproject subproject="requestfactory" subtarget="build"/>
44 <call-subproject subproject="servlet" subtarget="build"/>
45 <call-subproject subproject="jni" subtarget="build"/>
fabbott@google.com71e72af2009-06-13 02:28:21 +000046 </target>
47
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000048 <target name="dist" depends="build, doc" description="[action] Make all the distributions">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070049 <gwt.ant dir="distro-source"/>
jat@google.com04912f22008-11-26 00:21:22 +000050 </target>
51
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070052 <target name="dist-dev" depends="buildonly"
53 description="[action] Make this platform's distribution, minus doc and samples">
54 <gwt.ant dir="distro-source" target="build"/>
fabbott@google.com71e72af2009-06-13 02:28:21 +000055 </target>
56
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000057 <target name="dev" description="[subdir] Builds (or runs ${target} if set) all the dev libraries">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070058 <call-subproject subproject="buildtools" subtarget="build"/>
59 <gwt.ant dir="dev"/>
skybrian@google.comb6ec6682012-06-07 20:27:04 +000060 </target>
61
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070062 <target name="codeserver"
63 description="[subdir] Builds (or runs ${target} if set) only the SuperDevMode">
jat@google.com0b1619e2009-09-20 19:33:31 +000064 <call-subproject subproject="dev" subtarget="build"/>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070065 <gwt.ant dir="dev/codeserver"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000066 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000067
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070068 <target name="user"
69 description="[subdir] Builds (or runs ${target} if set) only the user library">
70 <call-subproject subproject="dev" subtarget="build"/>
71 <gwt.ant dir="user"/>
72 </target>
73
74 <target name="elemental"
75 description="[subdir] Builds (or runs ${target} if set) only the elemental library">
skybrian@google.comdaebbcb2012-06-15 16:42:27 +000076 <call-subproject subproject="user" subtarget="build"/>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070077 <gwt.ant dir="elemental"/>
skybrian@google.comdaebbcb2012-06-15 16:42:27 +000078 </target>
79
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000080 <target name="tools" description="[subdir] Builds (or runs ${target} if set) only the tools">
81 <call-subproject subproject="user" subtarget="build"/>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070082 <gwt.ant dir="tools"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000083 </target>
gwt.team.mmendez4449b342007-04-10 19:41:44 +000084
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070085 <target name="requestfactory"
86 description="[subdir] Builds (or runs ${target} if set) only the requestfactory jars">
87 <call-subproject subproject="user" subtarget="build"/>
88 <gwt.ant dir="requestfactory"/>
rice@google.comdbff9c52011-04-05 17:47:39 +000089 </target>
90
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070091 <target name="servlet"
92 description="[subdir] Builds (or runs ${target} if set) only the servlet jar">
93 <call-subproject subproject="user" subtarget="build"/>
94 <gwt.ant dir="servlet"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000095 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000096
jat@google.com64a55cb2009-10-16 14:16:57 +000097 <target name="jni" description="[subdir] Builds (or runs ${target} if set) jni for all platforms">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -070098 <gwt.ant dir="jni"/>
jat@google.com64a55cb2009-10-16 14:16:57 +000099 </target>
100
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000101 <target name="doc" description="[subdir] Builds (or runs ${target} if set) the doc">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700102 <call-subproject subproject="user" subtarget="build"/>
103 <gwt.ant dir="doc"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000104 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000105
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000106 <target name="samples" description="[subdir] Builds (or runs ${target} if set) the samples">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700107 <call-subproject subproject="user" subtarget="build"/>
108 <call-subproject subproject="codeserver" subtarget="build"/>
109 <gwt.ant dir="samples"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000110 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000111
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000112 <target name="buildtools" description="[subdir] Build (or runs ${target} if set) the build tools">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700113 <gwt.ant dir="build_tools"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000114 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000115
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700116 <target name="build"
117 description="[action] Builds GWT, including samples, but without distro packaging">
rice@google.comdbff9c52011-04-05 17:47:39 +0000118 <call-subproject subproject="dev" subtarget="build"/>
119 <call-subproject subproject="user" subtarget="build"/>
John Stalcup22ab7742014-10-01 12:40:50 -0700120 <call-subproject subproject="codeserver" subtarget="build"/>
rice@google.comdbff9c52011-04-05 17:47:39 +0000121 <call-subproject subproject="requestfactory" subtarget="build"/>
122 <call-subproject subproject="servlet" subtarget="build"/>
123 <call-subproject subproject="tools" subtarget="build"/>
124 <call-subproject subproject="jni" subtarget="build"/>
125 <call-subproject subproject="samples" subtarget="build"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000126 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000127
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000128 <target name="checkstyle" description="[action] Does static analysis of GWT source">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700129 <call-subproject subproject="buildtools" subtarget="checkstyle"/>
130 <call-subproject subproject="dev" subtarget="checkstyle"/>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700131 <call-subproject subproject="user" subtarget="checkstyle"/>
John Stalcup22ab7742014-10-01 12:40:50 -0700132 <call-subproject subproject="codeserver" subtarget="checkstyle"/>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700133 <call-subproject subproject="requestfactory" subtarget="checkstyle"/>
134 <call-subproject subproject="servlet" subtarget="checkstyle"/>
gwt.mirrorbot@gmail.comf3271372012-12-18 22:09:03 +0000135 <!-- servlet needed for tools/benchmark-viewer -->
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700136 <call-subproject subproject="servlet" subtarget="build"/>
137 <call-subproject subproject="tools" subtarget="checkstyle"/>
138 <call-subproject subproject="samples" subtarget="checkstyle"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000139 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000140
Thomas Broyer445d5e12014-02-19 18:27:28 +0100141 <target name="compile.tests" description="[action] Compile all the GWT tests, without running them">
142 <call-subproject subproject="buildtools" subtarget="compile.tests"/>
143 <call-subproject subproject="dev" subtarget="compile.tests"/>
Thomas Broyer445d5e12014-02-19 18:27:28 +0100144 <call-subproject subproject="user" subtarget="compile.tests"/>
John Stalcup22ab7742014-10-01 12:40:50 -0700145 <call-subproject subproject="codeserver" subtarget="compile.tests"/>
Thomas Broyer445d5e12014-02-19 18:27:28 +0100146 <call-subproject subproject="requestfactory" subtarget="compile.tests"/>
147 <call-subproject subproject="servlet" subtarget="compile.tests"/>
148 <call-subproject subproject="tools" subtarget="compile.tests"/>
149 </target>
150
Manuel Carrasco Moñino01c95672014-08-22 10:30:43 +0200151 <target name="test" depends="buildonly,apicheck,checkstyle"
Manuel Carrasco Moñinofe287142014-08-06 11:32:15 +0200152 description="[action] Runs all the GWT tests, including checkstyle, apicheck and elemental">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700153 <call-subproject subproject="buildtools" subtarget="test"/>
154 <call-subproject subproject="dev" subtarget="test"/>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700155 <call-subproject subproject="user" subtarget="test"/>
John Stalcup22ab7742014-10-01 12:40:50 -0700156 <call-subproject subproject="codeserver" subtarget="test"/>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700157 <call-subproject subproject="requestfactory" subtarget="test"/>
158 <call-subproject subproject="servlet" subtarget="test"/>
159 <call-subproject subproject="tools" subtarget="test"/>
Manuel Carrasco Moñinofe287142014-08-06 11:32:15 +0200160 <call-subproject subproject="elemental" subtarget="test"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000161 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000162
Manuel Carrasco Moñino01c95672014-08-22 10:30:43 +0200163 <target name="testrf" depends="buildonly"
rice@google.comdbff9c52011-04-05 17:47:39 +0000164 description="[action] Runs the GWT RequestFactory tests">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700165 <call-subproject subproject="dev" subtarget="compile.tests"/>
166 <call-subproject subproject="user" subtarget="compile.tests"/>
167 <call-subproject subproject="requestfactory" subtarget="test"/>
rice@google.comdbff9c52011-04-05 17:47:39 +0000168 </target>
169
jlabanca@google.com81244562009-08-05 19:55:36 +0000170 <path id="emma.classpath.src">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700171 <pathelement location="${gwt.root}/user/src"/>
172 <pathelement location="${gwt.root}/dev/**/src/com/google"/>
173 <pathelement location="${gwt.root}/build_tools/**/src/com/google"/>
174 <pathelement location="${gwt.root}/tools/**/src/com/google"/>
jlabanca@google.com81244562009-08-05 19:55:36 +0000175 </path>
176
177 <target name="emma.merge" description="Merges coverage data for all projects">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700178 <delete dir="${emma.merged.out}"/>
179 <mkdir dir="${emma.merged.out}"/>
jlabanca@google.com81244562009-08-05 19:55:36 +0000180 <emma>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700181 <merge outfile="${emma.merged.out}/merged.emma">
jlabanca@google.com81244562009-08-05 19:55:36 +0000182 <fileset dir="${project.build}">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700183 <include name="**/*.emma"/>
184 <exclude name="**/merged.emma"/>
jlabanca@google.com81244562009-08-05 19:55:36 +0000185 </fileset>
186 </merge>
187 </emma>
188 <emma>
189 <report sourcepath="${emma.classpath.src}">
190 <fileset dir="${project.build}">
191 <patternset>
192 <include name="**/metadata.emma"/>
193 </patternset>
194 </fileset>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700195 <fileset file="${emma.merged.out}/merged.emma"/>
196 <txt outfile="${emma.merged.out}/coverage.txt"/>
197 <html outfile="${emma.merged.out}/coverage.html"/>
198 <xml outfile="${emma.merged.out}/coverage.xml"/>
jlabanca@google.com81244562009-08-05 19:55:36 +0000199 </report>
200 </emma>
201 </target>
202
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000203 <target name="clean" description="[action] Cleans the entire GWT build">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700204 <delete dir="${gwt.build}"/>
205 <delete file="${gwt.root}/doc/packages.properties"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000206 </target>
fabbott@google.com831b44c2008-04-28 15:22:02 +0000207
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700208 <target name="presubmit"
209 description="[action] Deprecated for test, which now does checkstyle and apicheck"
jat@google.come0fa5b12009-10-13 23:57:19 +0000210 depends="test">
fabbott@google.com71e72af2009-06-13 02:28:21 +0000211 </target>
jat@google.come0fa5b12009-10-13 23:57:19 +0000212
Roberto Lublinerman299dd2f2014-02-12 13:01:21 -0800213 <target name="apicheck-nobuild"
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700214 description="[action] Checks API compatibility to prior GWT revision">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000215 <java failonerror="true" fork="true"
216 classname="com.google.gwt.tools.apichecker.ApiCompatibilityChecker">
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700217 <jvmarg line="-Xmx512m"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000218 <classpath>
219 <pathelement location="${gwt.build.out}/tools/api-checker/bin"/>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700220 <fileset dir="${gwt.build.lib}" includes="gwt-user.jar,gwt-dev.jar"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000221 <pathelement path="${java.class.path}"/>
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700222 <pathelement location="${gwt.tools.lib}/apache/ant-1.6.5.jar"/>
Goktug Gokdoganf50bd692015-02-02 19:33:42 -0800223 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar"/>
224 <pathelement
225 location="${gwt.tools.lib}/hibernate/validator/hibernate-validator-4.1.0.Final.jar"/>
226
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000227 </classpath>
amitmanjhi@google.comfe888202009-05-19 01:02:22 +0000228 <arg value="-refJar"/>
Thomas Broyerc481a532013-05-22 11:36:50 +0200229 <arg path="${gwt.apicheck.referencelibs}"/>
jat@google.come7f61a72008-12-24 00:45:21 +0000230 <arg value="-configFile"/>
fabbott@google.com744d7842009-10-08 01:58:00 +0000231 <arg file="${gwt.apicheck.config}"/>
amitmanjhi@google.comfe888202009-05-19 01:02:22 +0000232 <arg value="-logLevel"/>
233 <arg value="ERROR"/>
bobv@google.com5b7a2bf2011-01-18 16:32:58 +0000234 <!-- Needed for checking types that include validation APIs -->
Roberto Lublinermanf01ebee2014-03-15 09:20:11 -0700235 <arg value="-validationSourceJars"/>
236 <arg path="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000237 </java>
238 </target>
jat@google.come0fa5b12009-10-13 23:57:19 +0000239
Roberto Lublinerman299dd2f2014-02-12 13:01:21 -0800240 <target name="apicheck" depends="buildonly,tools,apicheck-nobuild"
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000241 description="[action] Builds GWT and checks API compatiblity to prior release"/>
jat@google.come0fa5b12009-10-13 23:57:19 +0000242
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000243</project>