blob: 8c61c74ea2cad7c563582f75daa55dbf7db7d5c6 [file] [log] [blame]
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +00001<project name="dev" default="build" basedir=".">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +00002 <property name="gwt.root" location=".." />
3 <property name="project.tail" value="dev" />
4 <import file="${gwt.root}/platforms.ant.xml" />
jat@google.com0b1619e2009-09-20 19:33:31 +00005 <import file="${gwt.root}/common.ant.xml" />
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +00006
jat@google.com0b1619e2009-09-20 19:33:31 +00007 <property name="alldeps.jar" location="${project.build}/alldeps.jar" />
8 <property name="gwt.junit.testcase.dev.core.includes" value="**/com/google/**/*Test.class" />
9 <property name="gwt.junit.testcase.dev.core.excludes" value="" />
fabbott@google.comf6dd0142009-07-11 02:19:32 +000010
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000011 <target name="clean" description="Cleans this project's intermediate and output files">
12 <delete dir="${project.build}" failonerror="false" />
jat@google.com0b1619e2009-09-20 19:33:31 +000013 <delete file="${project.lib}" failonerror="false" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000014 <delete failonerror="false">
jat@google.com0b1619e2009-09-20 19:33:31 +000015 <fileset dir="${gwt.build.lib}" includes="gwt-dev.jar"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000016 </delete>
17 </target>
jat@google.com0b1619e2009-09-20 19:33:31 +000018
jat@google.come0fa5b12009-10-13 23:57:19 +000019 <target name="compile.tests" depends="build, compile.emma.if.enabled" description="Compiles the test code for this project">
jat@google.com0b1619e2009-09-20 19:33:31 +000020 <mkdir dir="${javac.junit.out}" />
jat@google.come07256f2009-09-20 20:15:01 +000021 <gwt.javac srcdir="" destdir="${javac.junit.out}">
22 <src path="core/src" />
jat@google.com0b1619e2009-09-20 19:33:31 +000023 <src path="core/test" />
24 <src path="oophm/src" />
25 <src path="oophm/overlay" />
26 <src path="oophm/test" />
27 <classpath>
28 <pathelement location="${javac.out}" />
29 <pathelement location="${alldeps.jar}" />
30 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
31 </classpath>
32 </gwt.javac>
33 </target>
34
35 <target name="build.alldeps.jar" description="Merges all dependency jars into a single jar">
36 <mkdir dir="${project.build}" />
37 <outofdate> <!-- saves rescanning all the source jars' contents -->
38 <sourcefiles>
39 <fileset dir="${gwt.tools.lib}">
40 <include name="apache/tapestry-util-text-4.0.2.jar" />
41 <include name="apache/ant-1.6.5.jar" />
42 <include name="eclipse/jdt-3.4.2.jar" />
43 <include name="jetty/jetty-6.1.11.jar" />
44 <include name="tomcat/ant-launcher-1.6.5.jar" />
45 <include name="tomcat/catalina-1.0.jar" />
46 <include name="tomcat/catalina-optional-1.0.jar" />
47 <include name="tomcat/commons-beanutils-1.6.jar" />
48 <include name="tomcat/commons-collections-3.1.jar" />
49 <include name="tomcat/commons-digester-1.5.jar" />
50 <include name="tomcat/commons-el-1.0.jar" />
51 <include name="tomcat/commons-logging-1.0.jar" />
52 <include name="tomcat/commons-modeler-1.1.jar" />
53 <include name="tomcat/jakarta-regexp-1.3.jar" />
54 <include name="tomcat/jasper-compiler-1.0.jar" />
55 <include name="tomcat/jasper-runtime-1.0.jar" />
56 <include name="tomcat/jsp-api-2.0.jar" />
57 <include name="tomcat/mx4j-jmx-1.1.jar" />
58 <include name="tomcat/naming-common-1.0.jar" />
59 <include name="tomcat/naming-factory-1.0.jar" />
60 <include name="tomcat/naming-java-1.0.jar" />
61 <include name="tomcat/naming-resources-1.0.jar" />
62 <include name="tomcat/servlet-api-2.5.jar" />
63 <include name="tomcat/servlet-api-2.4.jar" />
64 <include name="tomcat/servlets-common-1.0.jar" />
65 <include name="tomcat/servlets-default-1.0.jar" />
66 <include name="tomcat/servlets-invoker-1.0.jar" />
67 <include name="tomcat/tomcat-coyote-1.0.jar" />
68 <include name="tomcat/tomcat-http11-1.0.jar" />
69 <include name="tomcat/tomcat-jk2-2.1.jar" />
70 <include name="tomcat/tomcat-util-5.1.jar" />
71 <!-- htmlunit dependencies not already included: BEGIN -->
72 <include name="apache/commons/commons-codec-1.3.jar" />
73 <include name="apache/commons/commons-httpclient-3.1.jar" />
74 <include name="apache/commons/commons-io-1.4.jar" />
75 <include name="apache/commons/commons-lang-2.4.jar" />
76 <include name="cssparser/cssparser-0.9.5.jar" />
amitmanjhi@google.com5868bc72009-10-13 20:52:35 +000077 <include name="htmlunit/htmlunit-r5070.jar" />
78 <include name="htmlunit/htmlunit-core-js-r5070.jar" />
79 <include name="nekohtml/nekohtml-1.9.13.jar" />
jat@google.com0b1619e2009-09-20 19:33:31 +000080 <include name="xalan/xalan-2.7.1.jar" />
81 <include name="xerces/xerces-2_9_1/serializer.jar" />
82 <include name="xerces/xerces-2_9_1/xercesImpl-NoMetaInf.jar" />
83 <include name="xerces/xerces-2_9_1/xml-apis.jar" />
84 <include name="w3c/sac/sac-1.3.jar" />
85 <!-- htmlunit dependencies not already included: END -->
86 <include name="sun/swingworker/swing-worker-1.1.jar" />
87 </fileset>
88 <fileset file="build.xml"/>
89 </sourcefiles>
90 <targetfiles>
91 <fileset file="${alldeps.jar}"/>
92 </targetfiles>
93 <sequential>
94 <gwt.jar destfile="${alldeps.jar}">
95 <zipfileset src="${gwt.tools.lib}/apache/tapestry-util-text-4.0.2.jar" />
96 <zipfileset src="${gwt.tools.lib}/apache/ant-1.6.5.jar" />
97 <zipfileset src="${gwt.tools.lib}/eclipse/jdt-3.4.2.jar" />
98 <zipfileset src="${gwt.tools.lib}/jetty/jetty-6.1.11.jar" />
99 <zipfileset src="${gwt.tools.lib}/tomcat/ant-launcher-1.6.5.jar" />
100 <zipfileset src="${gwt.tools.lib}/tomcat/catalina-1.0.jar" />
101 <zipfileset src="${gwt.tools.lib}/tomcat/catalina-optional-1.0.jar" />
102 <zipfileset src="${gwt.tools.lib}/tomcat/commons-beanutils-1.6.jar" />
103 <zipfileset src="${gwt.tools.lib}/tomcat/commons-collections-3.1.jar" />
104 <zipfileset src="${gwt.tools.lib}/tomcat/commons-digester-1.5.jar" />
105 <zipfileset src="${gwt.tools.lib}/tomcat/commons-el-1.0.jar" />
106 <zipfileset src="${gwt.tools.lib}/tomcat/commons-logging-1.0.jar" />
107 <zipfileset src="${gwt.tools.lib}/tomcat/commons-modeler-1.1.jar" />
108 <zipfileset src="${gwt.tools.lib}/tomcat/jakarta-regexp-1.3.jar" />
109 <zipfileset src="${gwt.tools.lib}/tomcat/jasper-compiler-1.0.jar" />
110 <zipfileset src="${gwt.tools.lib}/tomcat/jasper-runtime-1.0.jar" />
111 <zipfileset src="${gwt.tools.lib}/tomcat/jsp-api-2.0.jar" />
112 <zipfileset src="${gwt.tools.lib}/tomcat/mx4j-jmx-1.1.jar" />
113 <zipfileset src="${gwt.tools.lib}/tomcat/naming-common-1.0.jar" />
114 <zipfileset src="${gwt.tools.lib}/tomcat/naming-factory-1.0.jar" />
115 <zipfileset src="${gwt.tools.lib}/tomcat/naming-java-1.0.jar" />
116 <zipfileset src="${gwt.tools.lib}/tomcat/naming-resources-1.0.jar" />
117 <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
118 <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.4.jar" />
119 <zipfileset src="${gwt.tools.lib}/tomcat/servlets-common-1.0.jar" />
120 <zipfileset src="${gwt.tools.lib}/tomcat/servlets-default-1.0.jar" />
121 <zipfileset src="${gwt.tools.lib}/tomcat/servlets-invoker-1.0.jar" />
122 <zipfileset src="${gwt.tools.lib}/tomcat/tomcat-coyote-1.0.jar" />
123 <zipfileset src="${gwt.tools.lib}/tomcat/tomcat-http11-1.0.jar" />
124 <zipfileset src="${gwt.tools.lib}/tomcat/tomcat-jk2-2.1.jar" />
125 <zipfileset src="${gwt.tools.lib}/tomcat/tomcat-util-5.1.jar" />
126 <!-- htmlunit dependencies not already included: BEGIN -->
127 <zipfileset src="${gwt.tools.lib}/apache/commons/commons-codec-1.3.jar" />
128 <zipfileset src="${gwt.tools.lib}/apache/commons/commons-httpclient-3.1.jar" />
129 <zipfileset src="${gwt.tools.lib}/apache/commons/commons-io-1.4.jar" />
130 <zipfileset src="${gwt.tools.lib}/apache/commons/commons-lang-2.4.jar" />
131 <zipfileset src="${gwt.tools.lib}/cssparser/cssparser-0.9.5.jar" />
amitmanjhi@google.com5868bc72009-10-13 20:52:35 +0000132 <zipfileset src="${gwt.tools.lib}/htmlunit/htmlunit-r5070.jar" />
133 <zipfileset src="${gwt.tools.lib}/htmlunit/htmlunit-core-js-r5070.jar" />
134 <zipfileset src="${gwt.tools.lib}/nekohtml/nekohtml-1.9.13.jar" />
jat@google.com0b1619e2009-09-20 19:33:31 +0000135 <zipfileset src="${gwt.tools.lib}/xalan/xalan-2.7.1.jar" />
136 <zipfileset src="${gwt.tools.lib}/xerces/xerces-2_9_1/serializer.jar" />
137 <zipfileset src="${gwt.tools.lib}/xerces/xerces-2_9_1/xercesImpl-NoMetaInf.jar" />
138 <zipfileset src="${gwt.tools.lib}/xerces/xerces-2_9_1/xml-apis.jar" />
139 <zipfileset src="${gwt.tools.lib}/w3c/sac/sac-1.3.jar" />
140 <!-- htmlunit dependencies not already included: END -->
141 <zipfileset src="${gwt.tools.lib}/sun/swingworker/swing-worker-1.1.jar" />
142 </gwt.jar>
143 </sequential>
144 </outofdate>
145 </target>
146
147 <property name="filter.pattern" value="com/google/gwt/dev/About.properties" />
148
149 <target name="-filter.props" description="Creates filtered About.properties with version info"
150 unless="filter.uptodate">
151 <gwt.revfilter todir="${javac.out}">
152 <fileset dir="core/src" includes="${filter.pattern}" />
153 </gwt.revfilter>
154 <touch file="${filter.sentinel}" />
155 </target>
156
157 <target name="compiler.standalone" description="Validates that the standalone gwt-compiler project can build.">
158 <mkdir dir="${javac.out}" />
159 <gwt.javac srcdir="core/super" excludes="com/google/gwt/dev/jjs/intrinsic/"/>
160 <gwt.javac srcdir="core/src">
161 <include name="com/google/gwt/core/ext/**"/>
162 <include name="com/google/gwt/core/linker/**"/>
163 <include name="com/google/gwt/dev/About.java"/>
164 <include name="com/google/gwt/dev/asm/**"/>
165 <include name="com/google/gwt/dev/cfg/**"/>
166 <include name="com/google/gwt/dev/javac/**"/>
167 <include name="com/google/gwt/dev/jdt/**"/>
168 <include name="com/google/gwt/dev/jjs/**"/>
169 <include name="com/google/gwt/dev/js/**"/>
170 <include name="com/google/gwt/dev/resource/**"/>
171 <include name="com/google/gwt/dev/util/**"/>
scottb@google.comf7480d62009-10-16 17:59:37 +0000172 <include name="com/google/gwt/soyc/**"/>
jat@google.com0b1619e2009-09-20 19:33:31 +0000173 <include name="com/google/gwt/util/tools/**"/>
174 <classpath>
175 <pathelement location="${gwt.tools.lib}/apache/ant-1.6.5.jar" />
176 <pathelement location="${gwt.tools.lib}/eclipse/jdt-3.4.2.jar" />
177 <pathelement location="${gwt.tools.lib}/tomcat/commons-collections-3.1.jar" />
178 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
179 </classpath>
180 </gwt.javac>
181
182 </target>
183
184 <target name="compile" depends="compiler.standalone, build.alldeps.jar" description="Compiles this project">
185 <gwt.javac srcdir="" excludes="${filter.pattern}">
186 <src path="core/src" />
187 <src path="oophm/src" />
188 <src path="oophm/overlay" />
189 <classpath>
190 <pathelement location="${alldeps.jar}" />
191 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
192 </classpath>
193 </gwt.javac>
194 <copy todir="${javac.out}">
195 <fileset dir="core/src" includes="**/*.properties" excludes="${filter.pattern}"/>
196 </copy>
197
198 <!-- Files with hardcoded version information must be filtered -->
199 <gwt.getsvninfo />
200 <condition property="filter.uptodate">
201 <and>
202 <available file="${filter.sentinel}" />
203 <uptodate>
204 <srcfiles dir="core/src" includes="${filter.pattern}" />
205 <globmapper from="*" to="${javac.out}/*" />
206 </uptodate>
207 </and>
208 </condition>
209 <antcall target="-filter.props" />
210 </target>
211
212 <target name="checkstyle" description="Static analysis of source">
213 <gwt.checkstyle>
214 <fileset dir="core/src">
215 <filename name="com/google/gwt/dev/asm/**/*.java" negate="yes" />
216 <filename name="com/google/gwt/dev/js/rhino/**/*.java" negate="yes" />
217 <filename name="org/eclipse/**/*.java" negate="yes" />
218 <filename name="org/apache/**/*.java" negate="yes" />
219 </fileset>
220 <fileset dir="oophm/src" />
221 <fileset dir="oophm/overlay" />
222 <fileset dir="oophm/test" />
223 </gwt.checkstyle>
224
225 <gwt.checkstyle>
226 <fileset dir="core/super/com/google/gwt/dev/jjs/intrinsic" />
227 </gwt.checkstyle>
228
229 </target>
230
231 <target name="test" depends="build, compile.tests" description="Run unit tests for this project.">
232 <fileset id="tests.dev.core" dir="${javac.junit.out}" includes="${gwt.junit.testcase.dev.core.includes}" excludes="${gwt.junit.testcase.dev.core.excludes}" />
233 <gwt.junit test.out="${junit.out}" test.cases="tests.dev.core" >
234 <extraclasspaths>
235 <pathelement location="${alldeps.jar}" />
fabbott@google.comc0e9c9f2009-09-28 15:46:02 +0000236 <!-- TODO: the following six items are needed because dev (alone) does
237 not adhere to the .../{src,super,test} convention, having a split
238 between core, oophm, and (historically) the OS platforms. When
239 that unifies, these should go away. -->
240 <pathelement location="${gwt.root}/${project.tail}/core/src" />
241 <pathelement location="${gwt.root}/${project.tail}/core/super" />
242 <pathelement location="${gwt.root}/${project.tail}/core/test" />
243 <pathelement location="${gwt.root}/${project.tail}/oophm/src" />
244 <pathelement location="${gwt.root}/${project.tail}/oophm/overlay" />
245 <pathelement location="${gwt.root}/${project.tail}/oophm/test" />
jat@google.com0b1619e2009-09-20 19:33:31 +0000246 <!-- Pull in gwt-dev and gwt-user sources for .gwt.xml files -->
247 <pathelement location="${gwt.root}/user/src/" />
248 <pathelement location="${gwt.root}/user/super/" />
249 </extraclasspaths>
250 </gwt.junit>
251 </target>
252
253 <property.ensure name="gwt.tools.soyc" location="${gwt.root}/tools/soyc-vis" />
254 <target name="build" depends="compile" description="Build and package this project">
255 <mkdir dir="${gwt.build.lib}" />
256 <outofdate>
257 <sourcefiles>
258 <fileset dir="oophm/src" excludes="**/package.html"/>
259 <fileset dir="oophm/overlay" excludes="**/package.html"/>
260 <fileset dir="core/src">
261 <exclude name="**/package.html"/>
262 <exclude name="**/*.properties"/> <!-- copied and/or filtered into bin -->
263 </fileset>
264 <fileset dir="core/super" excludes="**/package.html" />
265 <fileset dir="${javac.out}" />
266 <fileset dir="${project.build}/bin" />
267 <fileset file="${project.build}/alldeps.jar" />
jat@google.com0b1619e2009-09-20 19:33:31 +0000268 <fileset file="${gwt.tools.soyc}/classLevel.css"/>
269 <fileset file="${gwt.tools.soyc}/roundedCorners.css"/>
270 </sourcefiles>
271 <targetfiles>
272 <fileset file="${project.lib}"/>
273 </targetfiles>
274 <sequential>
275 <gwt.jar>
276 <fileset dir="oophm/src" excludes="**/package.html"/>
277 <fileset dir="oophm/overlay" excludes="**/package.html"/>
278 <fileset dir="core/src">
279 <exclude name="**/package.html"/>
280 <exclude name="**/*.properties"/> <!-- copied and/or filtered into bin -->
281 </fileset>
282 <fileset dir="core/super" excludes="**/package.html" />
283 <fileset dir="${javac.out}" />
284 <zipfileset src="${alldeps.jar}" />
285
jat@google.com0b1619e2009-09-20 19:33:31 +0000286 <zipfileset file="${gwt.tools.soyc}/classLevel.css" prefix="com/google/gwt/soyc/resources/"/>
287 <zipfileset file="${gwt.tools.soyc}/roundedCorners.css" prefix="com/google/gwt/soyc/resources/"/>
288
289 <manifest>
290 <attribute name="Main-Class" value="com.google.gwt.dev.GWTMain" />
291 </manifest>
292 </gwt.jar>
293 </sequential>
294 </outofdate>
295 </target>
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +0000296</project>