blob: a7e283cf572d1a4fa8a684c379494d0af9bbdea8 [file] [log] [blame]
fabbott@google.com71e72af2009-06-13 02:28:21 +00001<project name="GWT" default="dist" basedir=".">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +00002 <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 -->
7 <property name="target" value="build" />
jlabanca@google.com81244562009-08-05 19:55:36 +00008 <property name="emma.merged.out" value="${project.build}/emma-coverage" />
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +00009
fabbott@google.com71e72af2009-06-13 02:28:21 +000010 <!--
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
21 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">
24 <attribute name="subproject" />
25 <attribute name="subtarget" />
26 <sequential>
27 <antcall target="@{subproject}">
28 <param name="target" value="@{subtarget}" />
29 </antcall>
30 </sequential>
31 </macrodef>
32
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000033 <property name="gwt.apicheck.config"
jlabanca@google.com88361222010-02-10 05:44:59 +000034 location="tools/api-checker/config/gwt20_21userApi.conf"/>
fabbott@google.com831b44c2008-04-28 15:22:02 +000035
amitmanjhi@google.com1dfeea62010-04-02 15:52:03 +000036 <target name="dist-bikeshed" depends="buildonly"
37 description="[action] Build bikeshed and minimal stuff, without distro packaging">
38 <call-subproject subproject="bikeshed" subtarget="build" />
amitmanjhi@google.com674ee0b2010-04-02 22:29:40 +000039 <call-subproject subproject="soyc" subtarget="build" />
amitmanjhi@google.com1dfeea62010-04-02 15:52:03 +000040 <gwt.ant dir="distro-source" target="build" />
41 </target>
42
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000043 <target name="buildonly"
44 description="[action] Minimal one-platform devel build, without distro packaging">
jat@google.com0b1619e2009-09-20 19:33:31 +000045 <call-subproject subproject="dev" subtarget="build" />
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000046 <call-subproject subproject="user" subtarget="build" />
47 <call-subproject subproject="servlet" subtarget="build" />
jat@google.com64a55cb2009-10-16 14:16:57 +000048 <call-subproject subproject="jni" subtarget="build" />
fabbott@google.com71e72af2009-06-13 02:28:21 +000049 </target>
50
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000051 <target name="dist" depends="build, doc" description="[action] Make all the distributions">
jat@google.com04912f22008-11-26 00:21:22 +000052 <gwt.ant dir="distro-source" />
53 </target>
54
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000055 <target name="dist-dev" depends="buildonly" description="[action] Make this platform's distribution, minus doc and samples">
jat@google.com0b1619e2009-09-20 19:33:31 +000056 <gwt.ant dir="distro-source" target="build" />
fabbott@google.com71e72af2009-06-13 02:28:21 +000057 </target>
58
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000059 <target name="dev" description="[subdir] Builds (or runs ${target} if set) all the dev libraries">
60 <call-subproject subproject="buildtools" subtarget="build" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000061 <gwt.ant dir="dev" />
62 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000063
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000064 <target name="user" description="[subdir] Builds (or runs ${target} if set) only the user library">
jat@google.com0b1619e2009-09-20 19:33:31 +000065 <call-subproject subproject="dev" subtarget="build"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000066 <gwt.ant dir="user" />
67 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000068
amitmanjhi@google.come726ead2010-04-02 15:14:38 +000069 <target name="bikeshed" description="[subdir] Builds (or runs ${target} if set) only the bikeshed library">
70 <call-subproject subproject="dev" subtarget="build"/>
71 <call-subproject subproject="user" subtarget="build"/>
72 <gwt.ant dir="bikeshed" />
73 </target>
74
amitmanjhi@google.com674ee0b2010-04-02 22:29:40 +000075 <target name="soyc" description="[subdir] Builds (or runs ${target} if set) only the soyc library">
76 <call-subproject subproject="dev" subtarget="build"/>
77 <call-subproject subproject="user" subtarget="build"/>
78 <gwt.ant dir="tools/soyc-vis" />
79 </target>
80
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000081 <target name="tools" description="[subdir] Builds (or runs ${target} if set) only the tools">
82 <call-subproject subproject="user" subtarget="build"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000083 <gwt.ant dir="tools" />
84 </target>
gwt.team.mmendez4449b342007-04-10 19:41:44 +000085
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000086 <target name="servlet" description="[subdir] Builds (or runs ${target} if set) only the servlet jar">
87 <call-subproject subproject="user" subtarget="build" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000088 <gwt.ant dir="servlet" />
89 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000090
jat@google.com64a55cb2009-10-16 14:16:57 +000091 <target name="jni" description="[subdir] Builds (or runs ${target} if set) jni for all platforms">
92 <gwt.ant dir="jni" />
93 </target>
94
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000095 <target name="doc" description="[subdir] Builds (or runs ${target} if set) the doc">
96 <call-subproject subproject="user" subtarget="build" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000097 <gwt.ant dir="doc" />
98 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000099
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000100 <target name="samples" description="[subdir] Builds (or runs ${target} if set) the samples">
101 <call-subproject subproject="user" subtarget="build" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000102 <gwt.ant dir="samples" />
103 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000104
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000105 <target name="buildtools" description="[subdir] Build (or runs ${target} if set) the build tools">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000106 <gwt.ant dir="build-tools" />
107 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000108
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000109 <target name="build" description="[action] Builds GWT, including samples, but without distro packaging">
110 <call-subproject subproject="dev" subtarget="build"/>
111 <call-subproject subproject="user" subtarget="build"/>
112 <call-subproject subproject="servlet" subtarget="build"/>
113 <call-subproject subproject="tools" subtarget="build"/>
jat@google.com64a55cb2009-10-16 14:16:57 +0000114 <call-subproject subproject="jni" subtarget="build"/>
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000115 <call-subproject subproject="samples" subtarget="build"/>
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000116
117 <!-- TODO: GWT 2.1.0 M1 SDK requires gwt-bikeshed.jar to be included. This
118 can be removed once bikeshed is merged into other JARs. -->
119 <call-subproject subproject="bikeshed" subtarget="build" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000120 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000121
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000122 <target name="checkstyle" description="[action] Does static analysis of GWT source">
fabbott@google.com71e72af2009-06-13 02:28:21 +0000123 <call-subproject subproject="buildtools" subtarget="checkstyle" />
124 <call-subproject subproject="dev" subtarget="checkstyle" />
125 <call-subproject subproject="user" subtarget="checkstyle" />
126 <call-subproject subproject="servlet" subtarget="checkstyle" />
127 <call-subproject subproject="tools" subtarget="checkstyle" />
128 <call-subproject subproject="samples" subtarget="checkstyle" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000129 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000130
fabbott@google.com61094352009-07-11 02:18:10 +0000131 <target name="test" depends="dist-dev,apicheck,checkstyle"
132 description="[action] Runs all the GWT tests, including checkstyle and apicheck">
fabbott@google.com71e72af2009-06-13 02:28:21 +0000133 <call-subproject subproject="buildtools" subtarget="test" />
134 <call-subproject subproject="dev" subtarget="test" />
135 <call-subproject subproject="user" subtarget="test" />
136 <call-subproject subproject="servlet" subtarget="test" />
137 <call-subproject subproject="tools" subtarget="test" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000138 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000139
gwt.mirrorbot@gmail.comd54a4bd2010-06-07 19:20:31 +0000140 <target name="benchmark" depends="dist-dev"
141 description="[action] Runs all the GWT benchmarks">
142 <call-subproject subproject="user" subtarget="benchmark" />
143 </target>
144
jlabanca@google.com81244562009-08-05 19:55:36 +0000145 <path id="emma.classpath.src">
146 <pathelement location="${gwt.root}/user/src" />
147 <pathelement location="${gwt.root}/dev/**/src/com/google" />
148 <pathelement location="${gwt.root}/build-tools/**/src/com/google" />
149 <pathelement location="${gwt.root}/tools/**/src/com/google" />
150 </path>
151
152 <target name="emma.merge" description="Merges coverage data for all projects">
153 <delete dir="${emma.merged.out}" />
154 <mkdir dir="${emma.merged.out}" />
155 <emma>
156 <merge outfile="${emma.merged.out}/merged.emma" >
157 <fileset dir="${project.build}">
158 <include name="**/*.emma" />
159 <exclude name="**/merged.emma" />
160 </fileset>
161 </merge>
162 </emma>
163 <emma>
164 <report sourcepath="${emma.classpath.src}">
165 <fileset dir="${project.build}">
166 <patternset>
167 <include name="**/metadata.emma"/>
168 </patternset>
169 </fileset>
170 <fileset file="${emma.merged.out}/merged.emma" />
171 <txt outfile="${emma.merged.out}/coverage.txt" />
172 <html outfile="${emma.merged.out}/coverage.html" />
173 <xml outfile="${emma.merged.out}/coverage.xml" />
174 </report>
175 </emma>
176 </target>
177
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000178 <target name="clean" description="[action] Cleans the entire GWT build">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000179 <delete dir="${gwt.build}" />
180 </target>
fabbott@google.com831b44c2008-04-28 15:22:02 +0000181
fabbott@google.com61094352009-07-11 02:18:10 +0000182 <target name ="presubmit" description="[action] Deprecated for test, which now does checkstyle and apicheck"
jat@google.come0fa5b12009-10-13 23:57:19 +0000183 depends="test">
fabbott@google.com71e72af2009-06-13 02:28:21 +0000184 </target>
jat@google.come0fa5b12009-10-13 23:57:19 +0000185
ecc@google.comed46bf82009-01-29 17:07:24 +0000186 <target name="apicheck-nobuild"
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000187 description="[action] Checks API compatibility to prior GWT revision">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000188 <java failonerror="true" fork="true"
189 classname="com.google.gwt.tools.apichecker.ApiCompatibilityChecker">
jat@google.come7f61a72008-12-24 00:45:21 +0000190 <jvmarg line="-Xmx512m" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000191 <classpath>
192 <pathelement location="${gwt.build.out}/tools/api-checker/bin"/>
jat@google.com0b1619e2009-09-20 19:33:31 +0000193 <fileset dir="${gwt.build.lib}" includes="gwt-user.jar,gwt-dev.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000194 <pathelement path="${java.class.path}"/>
amitmanjhi@google.comfe888202009-05-19 01:02:22 +0000195 <pathelement location="${gwt.tools.lib}/apache/ant-1.6.5.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000196 </classpath>
amitmanjhi@google.comfe888202009-05-19 01:02:22 +0000197 <arg value="-refJar"/>
fabbott@google.com35e6cb12009-07-13 12:30:55 +0000198 <arg path="${gwt.root}/tools/api-checker/reference/gwt-dev-modified.jar:${gwt.root}/tools/api-checker/reference/gwt-user-modified.jar"/>
jat@google.come7f61a72008-12-24 00:45:21 +0000199 <arg value="-configFile"/>
fabbott@google.com744d7842009-10-08 01:58:00 +0000200 <arg file="${gwt.apicheck.config}"/>
amitmanjhi@google.comfe888202009-05-19 01:02:22 +0000201 <arg value="-logLevel"/>
202 <arg value="ERROR"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000203 </java>
204 </target>
jat@google.come0fa5b12009-10-13 23:57:19 +0000205
fabbott@google.com61094352009-07-11 02:18:10 +0000206 <target name="apicheck" depends="buildonly,tools,apicheck-nobuild"
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000207 description="[action] Builds GWT and checks API compatiblity to prior release"/>
jat@google.come0fa5b12009-10-13 23:57:19 +0000208
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000209</project>