blob: 8fbc6c5e484d91262545296cd1e1c20de356a598 [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" />
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +00008
fabbott@google.com71e72af2009-06-13 02:28:21 +00009 <!--
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000010 Convenience for the lateral calls we make. Use gwt.ant to
11 descend into another directory, and this to call in the same build.xml.
12 NOTE THE USE OF $TARGET, here and in common's gwt.ant. This has the
13 effect of dividing rules into subdirectory rules (using gwt.ant and
14 sensitive to $target) and action rules (using call-subproject and
15 setting $target)... but it is Bad for a subdirectory rule to depend
16 on another one, as they are both sensitive to $target, but you probably
17 mean that subdirB needed subdirA to be _built_, not $target'ed (tested,
18 etc.)
19
20 In other words, DO NOT USE DEPENDS=... IN A TARGET WITH GWT.ANT.
fabbott@google.com71e72af2009-06-13 02:28:21 +000021 -->
22 <macrodef name="call-subproject">
23 <attribute name="subproject" />
24 <attribute name="subtarget" />
25 <sequential>
26 <antcall target="@{subproject}">
27 <param name="target" value="@{subtarget}" />
28 </antcall>
29 </sequential>
30 </macrodef>
31
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000032 <property name="gwt.apicheck.config"
amitmanjhi@google.com83b76232009-05-19 19:47:16 +000033 location="tools/api-checker/config/gwt16_20userApi.conf"/>
fabbott@google.com831b44c2008-04-28 15:22:02 +000034
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000035 <target name="buildonly"
36 description="[action] Minimal one-platform devel build, without distro packaging">
37 <call-subproject subproject="dev-one" subtarget="build" />
38 <call-subproject subproject="user" subtarget="build" />
39 <call-subproject subproject="servlet" subtarget="build" />
40 <call-subproject subproject="jni-one" subtarget="build" />
fabbott@google.com71e72af2009-06-13 02:28:21 +000041 </target>
42
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000043 <target name="dist" depends="build, doc" description="[action] Make all the distributions">
jat@google.com04912f22008-11-26 00:21:22 +000044 <gwt.ant dir="distro-source" />
45 </target>
46
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000047 <target name="dist-one" depends="buildonly, tools, samples, doc" description="[action] Make only this platform's distribution">
fabbott@google.com71e72af2009-06-13 02:28:21 +000048 <gwt.ant dir="distro-source" target="${build.host.platform}" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000049 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000050
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000051 <target name="dist-dev" depends="buildonly" description="[action] Make this platform's distribution, minus doc and samples">
fabbott@google.com71e72af2009-06-13 02:28:21 +000052 <gwt.ant dir="distro-source" target="${build.host.platform}" />
53 </target>
54
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000055 <target name="dev" description="[subdir] Builds (or runs ${target} if set) all the dev libraries">
56 <call-subproject subproject="buildtools" subtarget="build" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000057 <gwt.ant dir="dev" />
58 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000059
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000060 <target name="dev-one" description="[subdir] Builds only the dev library for this platform">
61 <call-subproject subproject="buildtools" subtarget="build" />
fabbott@google.com71e72af2009-06-13 02:28:21 +000062 <gwt.ant dir="dev" target="${build.host.platform}"/>
63 <gwt.ant dir="dev" target="oophm"/>
64 </target>
65
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000066 <target name="user" description="[subdir] Builds (or runs ${target} if set) only the user library">
67 <call-subproject subproject="dev-one" subtarget="build"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000068 <gwt.ant dir="user" />
69 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000070
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000071 <target name="tools" description="[subdir] Builds (or runs ${target} if set) only the tools">
72 <call-subproject subproject="user" subtarget="build"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000073 <gwt.ant dir="tools" />
74 </target>
gwt.team.mmendez4449b342007-04-10 19:41:44 +000075
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000076 <target name="servlet" description="[subdir] Builds (or runs ${target} if set) only the servlet jar">
77 <call-subproject subproject="user" subtarget="build" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000078 <gwt.ant dir="servlet" />
79 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000080
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000081 <target name="jni" description="[subdir] Builds (or runs ${target} if set) jni for all platforms">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000082 <gwt.ant dir="jni" />
83 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000084
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000085 <target name="jni-one" description="[subdir] Builds jni for only this platform">
fabbott@google.com71e72af2009-06-13 02:28:21 +000086 <gwt.ant dir="jni" target="${build.host.platform}" />
87 </target>
88
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000089 <target name="doc" description="[subdir] Builds (or runs ${target} if set) the doc">
90 <call-subproject subproject="user" subtarget="build" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000091 <gwt.ant dir="doc" />
92 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000093
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000094 <target name="samples" description="[subdir] Builds (or runs ${target} if set) the samples">
95 <call-subproject subproject="user" subtarget="build" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000096 <gwt.ant dir="samples" />
97 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +000098
fabbott@google.com3d7fbc22009-06-18 05:07:26 +000099 <target name="buildtools" description="[subdir] Build (or runs ${target} if set) the build tools">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000100 <gwt.ant dir="build-tools" />
101 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000102
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000103 <target name="build" description="[action] Builds GWT, including samples, but without distro packaging">
104 <call-subproject subproject="dev" subtarget="build"/>
105 <call-subproject subproject="user" 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.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="checkstyle" description="[action] Does static analysis of GWT source">
fabbott@google.com71e72af2009-06-13 02:28:21 +0000113 <call-subproject subproject="buildtools" subtarget="checkstyle" />
114 <call-subproject subproject="dev" subtarget="checkstyle" />
115 <call-subproject subproject="user" subtarget="checkstyle" />
116 <call-subproject subproject="servlet" subtarget="checkstyle" />
117 <call-subproject subproject="tools" subtarget="checkstyle" />
118 <call-subproject subproject="samples" subtarget="checkstyle" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000119 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000120
fabbott@google.com61094352009-07-11 02:18:10 +0000121 <target name="test" depends="dist-dev,apicheck,checkstyle"
122 description="[action] Runs all the GWT tests, including checkstyle and apicheck">
fabbott@google.com71e72af2009-06-13 02:28:21 +0000123 <call-subproject subproject="buildtools" subtarget="test" />
124 <call-subproject subproject="dev" subtarget="test" />
125 <call-subproject subproject="user" subtarget="test" />
126 <call-subproject subproject="servlet" subtarget="test" />
127 <call-subproject subproject="tools" subtarget="test" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000128 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000129
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000130 <target name="clean" description="[action] Cleans the entire GWT build">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000131 <delete dir="${gwt.build}" />
132 </target>
fabbott@google.com831b44c2008-04-28 15:22:02 +0000133
fabbott@google.com61094352009-07-11 02:18:10 +0000134 <target name ="presubmit" description="[action] Deprecated for test, which now does checkstyle and apicheck"
135 depends="test">
fabbott@google.com71e72af2009-06-13 02:28:21 +0000136 </target>
ecc@google.comed46bf82009-01-29 17:07:24 +0000137
138 <target name="apicheck-nobuild"
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000139 description="[action] Checks API compatibility to prior GWT revision">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000140 <copy tofile="${gwt.build.out}/userApi.conf" filtering="false"
141 file="${gwt.apicheck.config}"
142 overwrite="true">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000143 </copy>
144 <java failonerror="true" fork="true"
145 classname="com.google.gwt.tools.apichecker.ApiCompatibilityChecker">
jat@google.come7f61a72008-12-24 00:45:21 +0000146 <jvmarg line="-Xmx512m" />
147 <sysproperty key="gwt.devjar" value="${gwt.dev.staging.jar}" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000148 <classpath>
149 <pathelement location="${gwt.build.out}/tools/api-checker/bin"/>
scottb@google.com22e24742009-04-02 23:43:08 +0000150 <fileset dir="${gwt.build.lib}" includes="gwt-user.jar,gwt-dev-*.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000151 <pathelement path="${java.class.path}"/>
amitmanjhi@google.comfe888202009-05-19 01:02:22 +0000152 <pathelement location="${gwt.tools.lib}/apache/ant-1.6.5.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000153 </classpath>
amitmanjhi@google.comfe888202009-05-19 01:02:22 +0000154 <arg value="-refJar"/>
fabbott@google.com35e6cb12009-07-13 12:30:55 +0000155 <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 +0000156 <arg value="-configFile"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000157 <arg file="${gwt.build.out}/userApi.conf"/>
amitmanjhi@google.comfe888202009-05-19 01:02:22 +0000158 <arg value="-logLevel"/>
159 <arg value="ERROR"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000160 </java>
161 </target>
ecc@google.comed46bf82009-01-29 17:07:24 +0000162
fabbott@google.com61094352009-07-11 02:18:10 +0000163 <target name="apicheck" depends="buildonly,tools,apicheck-nobuild"
fabbott@google.com3d7fbc22009-06-18 05:07:26 +0000164 description="[action] Builds GWT and checks API compatiblity to prior release"/>
ecc@google.comed46bf82009-01-29 17:07:24 +0000165
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000166</project>