fabbott@google.com | 71e72af | 2009-06-13 02:28:21 +0000 | [diff] [blame] | 1 | <project name="GWT" default="dist" basedir="."> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 2 | <property name="gwt.root" location="." /> |
| 3 | <property name="project.tail" value="" /> |
| 4 | <import file="${gwt.root}/common.ant.xml" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 5 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 6 | <!-- "build" is the default when subprojects are directly targetted --> |
| 7 | <property name="target" value="build" /> |
jlabanca@google.com | 8124456 | 2009-08-05 19:55:36 +0000 | [diff] [blame] | 8 | <property name="emma.merged.out" value="${project.build}/emma-coverage" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 9 | |
fabbott@google.com | 71e72af | 2009-06-13 02:28:21 +0000 | [diff] [blame] | 10 | <!-- |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 11 | 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.com | 71e72af | 2009-06-13 02:28:21 +0000 | [diff] [blame] | 22 | --> |
| 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.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 33 | <property name="gwt.apicheck.config" |
jlabanca@google.com | 0e4aa7d | 2011-05-24 11:12:44 +0000 | [diff] [blame] | 34 | location="tools/api-checker/config/gwt23_24userApi.conf"/> |
fabbott@google.com | 831b44c | 2008-04-28 15:22:02 +0000 | [diff] [blame] | 35 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 36 | <target name="buildonly" |
| 37 | description="[action] Minimal one-platform devel build, without distro packaging"> |
jat@google.com | 0b1619e | 2009-09-20 19:33:31 +0000 | [diff] [blame] | 38 | <call-subproject subproject="dev" subtarget="build" /> |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 39 | <call-subproject subproject="user" subtarget="build" /> |
rice@google.com | dbff9c5 | 2011-04-05 17:47:39 +0000 | [diff] [blame] | 40 | <call-subproject subproject="requestfactory" subtarget="build" /> |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 41 | <call-subproject subproject="servlet" subtarget="build" /> |
jat@google.com | 64a55cb | 2009-10-16 14:16:57 +0000 | [diff] [blame] | 42 | <call-subproject subproject="jni" subtarget="build" /> |
fabbott@google.com | 71e72af | 2009-06-13 02:28:21 +0000 | [diff] [blame] | 43 | </target> |
| 44 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 45 | <target name="dist" depends="build, doc" description="[action] Make all the distributions"> |
jat@google.com | 04912f2 | 2008-11-26 00:21:22 +0000 | [diff] [blame] | 46 | <gwt.ant dir="distro-source" /> |
| 47 | </target> |
| 48 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 49 | <target name="dist-dev" depends="buildonly" description="[action] Make this platform's distribution, minus doc and samples"> |
jat@google.com | 0b1619e | 2009-09-20 19:33:31 +0000 | [diff] [blame] | 50 | <gwt.ant dir="distro-source" target="build" /> |
fabbott@google.com | 71e72af | 2009-06-13 02:28:21 +0000 | [diff] [blame] | 51 | </target> |
| 52 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 53 | <target name="dev" description="[subdir] Builds (or runs ${target} if set) all the dev libraries"> |
| 54 | <call-subproject subproject="buildtools" subtarget="build" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 55 | <gwt.ant dir="dev" /> |
| 56 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 57 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 58 | <target name="user" description="[subdir] Builds (or runs ${target} if set) only the user library"> |
jat@google.com | 0b1619e | 2009-09-20 19:33:31 +0000 | [diff] [blame] | 59 | <call-subproject subproject="dev" subtarget="build"/> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 60 | <gwt.ant dir="user" /> |
| 61 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 62 | |
amitmanjhi@google.com | 674ee0b | 2010-04-02 22:29:40 +0000 | [diff] [blame] | 63 | <target name="soyc" description="[subdir] Builds (or runs ${target} if set) only the soyc library"> |
| 64 | <call-subproject subproject="dev" subtarget="build"/> |
| 65 | <call-subproject subproject="user" subtarget="build"/> |
| 66 | <gwt.ant dir="tools/soyc-vis" /> |
| 67 | </target> |
| 68 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 69 | <target name="tools" description="[subdir] Builds (or runs ${target} if set) only the tools"> |
| 70 | <call-subproject subproject="user" subtarget="build"/> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 71 | <gwt.ant dir="tools" /> |
| 72 | </target> |
gwt.team.mmendez | 4449b34 | 2007-04-10 19:41:44 +0000 | [diff] [blame] | 73 | |
rice@google.com | dbff9c5 | 2011-04-05 17:47:39 +0000 | [diff] [blame] | 74 | <target name="requestfactory" description="[subdir] Builds (or runs ${target} if set) only the requestfactory jars"> |
| 75 | <call-subproject subproject="user" subtarget="build" /> |
| 76 | <gwt.ant dir="requestfactory" /> |
| 77 | </target> |
| 78 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 79 | <target name="servlet" description="[subdir] Builds (or runs ${target} if set) only the servlet jar"> |
| 80 | <call-subproject subproject="user" subtarget="build" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 81 | <gwt.ant dir="servlet" /> |
| 82 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 83 | |
jat@google.com | 64a55cb | 2009-10-16 14:16:57 +0000 | [diff] [blame] | 84 | <target name="jni" description="[subdir] Builds (or runs ${target} if set) jni for all platforms"> |
| 85 | <gwt.ant dir="jni" /> |
| 86 | </target> |
| 87 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 88 | <target name="doc" description="[subdir] Builds (or runs ${target} if set) the doc"> |
| 89 | <call-subproject subproject="user" subtarget="build" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 90 | <gwt.ant dir="doc" /> |
| 91 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 92 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 93 | <target name="samples" description="[subdir] Builds (or runs ${target} if set) the samples"> |
| 94 | <call-subproject subproject="user" subtarget="build" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 95 | <gwt.ant dir="samples" /> |
| 96 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 97 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 98 | <target name="buildtools" description="[subdir] Build (or runs ${target} if set) the build tools"> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 99 | <gwt.ant dir="build-tools" /> |
| 100 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 101 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 102 | <target name="build" description="[action] Builds GWT, including samples, but without distro packaging"> |
rice@google.com | dbff9c5 | 2011-04-05 17:47:39 +0000 | [diff] [blame] | 103 | <call-subproject subproject="dev" subtarget="build"/> |
| 104 | <call-subproject subproject="user" subtarget="build"/> |
| 105 | <call-subproject subproject="requestfactory" subtarget="build"/> |
| 106 | <call-subproject subproject="servlet" subtarget="build"/> |
| 107 | <call-subproject subproject="tools" subtarget="build"/> |
| 108 | <call-subproject subproject="jni" subtarget="build"/> |
| 109 | <call-subproject subproject="samples" subtarget="build"/> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 110 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 111 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 112 | <target name="checkstyle" description="[action] Does static analysis of GWT source"> |
fabbott@google.com | 71e72af | 2009-06-13 02:28:21 +0000 | [diff] [blame] | 113 | <call-subproject subproject="buildtools" subtarget="checkstyle" /> |
| 114 | <call-subproject subproject="dev" subtarget="checkstyle" /> |
| 115 | <call-subproject subproject="user" subtarget="checkstyle" /> |
rice@google.com | dbff9c5 | 2011-04-05 17:47:39 +0000 | [diff] [blame] | 116 | <call-subproject subproject="requestfactory" subtarget="checkstyle" /> |
fabbott@google.com | 71e72af | 2009-06-13 02:28:21 +0000 | [diff] [blame] | 117 | <call-subproject subproject="servlet" subtarget="checkstyle" /> |
| 118 | <call-subproject subproject="tools" subtarget="checkstyle" /> |
| 119 | <call-subproject subproject="samples" subtarget="checkstyle" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 120 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 121 | |
fabbott@google.com | 6109435 | 2009-07-11 02:18:10 +0000 | [diff] [blame] | 122 | <target name="test" depends="dist-dev,apicheck,checkstyle" |
| 123 | description="[action] Runs all the GWT tests, including checkstyle and apicheck"> |
fabbott@google.com | 71e72af | 2009-06-13 02:28:21 +0000 | [diff] [blame] | 124 | <call-subproject subproject="buildtools" subtarget="test" /> |
| 125 | <call-subproject subproject="dev" subtarget="test" /> |
| 126 | <call-subproject subproject="user" subtarget="test" /> |
rice@google.com | dbff9c5 | 2011-04-05 17:47:39 +0000 | [diff] [blame] | 127 | <call-subproject subproject="requestfactory" subtarget="test" /> |
fabbott@google.com | 71e72af | 2009-06-13 02:28:21 +0000 | [diff] [blame] | 128 | <call-subproject subproject="servlet" subtarget="test" /> |
| 129 | <call-subproject subproject="tools" subtarget="test" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 130 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 131 | |
rice@google.com | dbff9c5 | 2011-04-05 17:47:39 +0000 | [diff] [blame] | 132 | <target name="testrf" depends="dist-dev" |
| 133 | description="[action] Runs the GWT RequestFactory tests"> |
| 134 | <call-subproject subproject="dev" subtarget="compile.tests" /> |
| 135 | <call-subproject subproject="user" subtarget="compile.tests" /> |
| 136 | <call-subproject subproject="requestfactory" subtarget="test" /> |
| 137 | </target> |
| 138 | |
gwt.mirrorbot@gmail.com | d54a4bd | 2010-06-07 19:20:31 +0000 | [diff] [blame] | 139 | <target name="benchmark" depends="dist-dev" |
| 140 | description="[action] Runs all the GWT benchmarks"> |
| 141 | <call-subproject subproject="user" subtarget="benchmark" /> |
| 142 | </target> |
| 143 | |
jlabanca@google.com | 8124456 | 2009-08-05 19:55:36 +0000 | [diff] [blame] | 144 | <path id="emma.classpath.src"> |
| 145 | <pathelement location="${gwt.root}/user/src" /> |
| 146 | <pathelement location="${gwt.root}/dev/**/src/com/google" /> |
| 147 | <pathelement location="${gwt.root}/build-tools/**/src/com/google" /> |
| 148 | <pathelement location="${gwt.root}/tools/**/src/com/google" /> |
| 149 | </path> |
| 150 | |
| 151 | <target name="emma.merge" description="Merges coverage data for all projects"> |
| 152 | <delete dir="${emma.merged.out}" /> |
| 153 | <mkdir dir="${emma.merged.out}" /> |
| 154 | <emma> |
| 155 | <merge outfile="${emma.merged.out}/merged.emma" > |
| 156 | <fileset dir="${project.build}"> |
| 157 | <include name="**/*.emma" /> |
| 158 | <exclude name="**/merged.emma" /> |
| 159 | </fileset> |
| 160 | </merge> |
| 161 | </emma> |
| 162 | <emma> |
| 163 | <report sourcepath="${emma.classpath.src}"> |
| 164 | <fileset dir="${project.build}"> |
| 165 | <patternset> |
| 166 | <include name="**/metadata.emma"/> |
| 167 | </patternset> |
| 168 | </fileset> |
| 169 | <fileset file="${emma.merged.out}/merged.emma" /> |
| 170 | <txt outfile="${emma.merged.out}/coverage.txt" /> |
| 171 | <html outfile="${emma.merged.out}/coverage.html" /> |
| 172 | <xml outfile="${emma.merged.out}/coverage.xml" /> |
| 173 | </report> |
| 174 | </emma> |
| 175 | </target> |
| 176 | |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 177 | <target name="clean" description="[action] Cleans the entire GWT build"> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 178 | <delete dir="${gwt.build}" /> |
conroy@google.com | b090e0a | 2010-10-08 18:08:21 +0000 | [diff] [blame] | 179 | <delete file="${gwt.root}/doc/packages.properties" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 180 | </target> |
fabbott@google.com | 831b44c | 2008-04-28 15:22:02 +0000 | [diff] [blame] | 181 | |
fabbott@google.com | 6109435 | 2009-07-11 02:18:10 +0000 | [diff] [blame] | 182 | <target name ="presubmit" description="[action] Deprecated for test, which now does checkstyle and apicheck" |
jat@google.com | e0fa5b1 | 2009-10-13 23:57:19 +0000 | [diff] [blame] | 183 | depends="test"> |
fabbott@google.com | 71e72af | 2009-06-13 02:28:21 +0000 | [diff] [blame] | 184 | </target> |
jat@google.com | e0fa5b1 | 2009-10-13 23:57:19 +0000 | [diff] [blame] | 185 | |
ecc@google.com | ed46bf8 | 2009-01-29 17:07:24 +0000 | [diff] [blame] | 186 | <target name="apicheck-nobuild" |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 187 | description="[action] Checks API compatibility to prior GWT revision"> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 188 | <java failonerror="true" fork="true" |
| 189 | classname="com.google.gwt.tools.apichecker.ApiCompatibilityChecker"> |
jat@google.com | e7f61a7 | 2008-12-24 00:45:21 +0000 | [diff] [blame] | 190 | <jvmarg line="-Xmx512m" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 191 | <classpath> |
| 192 | <pathelement location="${gwt.build.out}/tools/api-checker/bin"/> |
jat@google.com | 0b1619e | 2009-09-20 19:33:31 +0000 | [diff] [blame] | 193 | <fileset dir="${gwt.build.lib}" includes="gwt-user.jar,gwt-dev.jar" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 194 | <pathelement path="${java.class.path}"/> |
amitmanjhi@google.com | fe88820 | 2009-05-19 01:02:22 +0000 | [diff] [blame] | 195 | <pathelement location="${gwt.tools.lib}/apache/ant-1.6.5.jar" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 196 | </classpath> |
amitmanjhi@google.com | fe88820 | 2009-05-19 01:02:22 +0000 | [diff] [blame] | 197 | <arg value="-refJar"/> |
fabbott@google.com | 35e6cb1 | 2009-07-13 12:30:55 +0000 | [diff] [blame] | 198 | <arg path="${gwt.root}/tools/api-checker/reference/gwt-dev-modified.jar:${gwt.root}/tools/api-checker/reference/gwt-user-modified.jar"/> |
jat@google.com | e7f61a7 | 2008-12-24 00:45:21 +0000 | [diff] [blame] | 199 | <arg value="-configFile"/> |
fabbott@google.com | 744d784 | 2009-10-08 01:58:00 +0000 | [diff] [blame] | 200 | <arg file="${gwt.apicheck.config}"/> |
amitmanjhi@google.com | fe88820 | 2009-05-19 01:02:22 +0000 | [diff] [blame] | 201 | <arg value="-logLevel"/> |
| 202 | <arg value="ERROR"/> |
bobv@google.com | 5b7a2bf | 2011-01-18 16:32:58 +0000 | [diff] [blame] | 203 | <!-- Needed for checking types that include validation APIs --> |
| 204 | <arg value="-validationSourceJars" /> |
| 205 | <arg path="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 206 | </java> |
| 207 | </target> |
jat@google.com | e0fa5b1 | 2009-10-13 23:57:19 +0000 | [diff] [blame] | 208 | |
fabbott@google.com | 6109435 | 2009-07-11 02:18:10 +0000 | [diff] [blame] | 209 | <target name="apicheck" depends="buildonly,tools,apicheck-nobuild" |
fabbott@google.com | 3d7fbc2 | 2009-06-18 05:07:26 +0000 | [diff] [blame] | 210 | description="[action] Builds GWT and checks API compatiblity to prior release"/> |
jat@google.com | e0fa5b1 | 2009-10-13 23:57:19 +0000 | [diff] [blame] | 211 | |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 212 | </project> |