blob: fcda00aea0bff424c531664fb0fa7879aa658cbf [file] [log] [blame]
gwt.team.jgw89075d42006-12-08 20:51:13 +00001<project name="doc" default="all" basedir=".">
gwt.team.scottb6ba31b82006-12-08 23:38:16 +00002 <property name="gwt.root" location=".." />
3 <property name="project.tail" value="doc" />
4 <import file="${gwt.root}/common.ant.xml" />
gwt.team.jgw89075d42006-12-08 20:51:13 +00005
gwt.team.scottb428b2632006-12-12 22:40:34 +00006 <property.ensure name="java.tools.path" location="${java.home}/../lib/tools.jar" unless="build.host.ismac" message="Cannot find ${java.home}/../lib/tools.jar; please use a JDK when building doc rather than a JRE." />
7
gwt.team.scottb6ba31b82006-12-08 23:38:16 +00008 <property.ensure name="gwt.user.jar" location="${gwt.build.lib}/gwt-user.jar" />
9 <!-- Platform shouldn't matter here, just picking one -->
10 <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev-linux.jar" />
gwt.team.jgw89075d42006-12-08 20:51:13 +000011
gwt.team.mmendez4449b342007-04-10 19:41:44 +000012 <property name="USER_PKGS" value="com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.typeinfo;com.google.gwt.i18n.client;com.google.gwt.json.client;com.google.gwt.junit.client;com.google.gwt.user.client;com.google.gwt.user.client.rpc;com.google.gwt.user.client.ui;com.google.gwt.user.server.rpc;com.google.gwt.xml.client;com.google.gwt.http.client;com.google.gwt.junit.viewer.client" />
gwt.team.mmendez1a384302007-04-19 17:53:42 +000013 <property name="LANG_PKGS" value="java.lang;java.util;java.io" />
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000014 <property name="DOC_PKGS" value="com.google.gwt.doc" />
gwt.team.jgw89075d42006-12-08 20:51:13 +000015
gwt.team.jatd4758962007-02-28 20:26:52 +000016 <!--
17 *** Note that if the USER_SOURCE_PATH paths are updated,
18 the fileset dependencies in the outofdate tags in the doc,
19 user, and javadoc targets must be updated as well.
20 -->
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000021 <path id="USER_SOURCE_PATH">
22 <pathelement location="${gwt.root}/user/src" />
23 <pathelement location="${gwt.root}/user/javadoc" />
24 <pathelement location="${gwt.root}/user/super" />
25 <pathelement location="${gwt.root}/dev/core/src" />
26 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000027
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000028 <path id="USER_CLASS_PATH">
29 <pathelement location="${gwt.user.jar}" />
30 <pathelement location="${gwt.dev.jar}" />
31 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
gwt.team.mmendez4449b342007-04-10 19:41:44 +000032 <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000033 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000034
gwt.team.jatd4758962007-02-28 20:26:52 +000035 <!--
36 *** Note that if the DOC_SOURCE_PATH paths are updated,
37 the fileset dependencies in the outofdate tags in the
38 doc target must be updated as well.
39 -->
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000040 <path id="DOC_SOURCE_PATH">
41 <pathelement location="./src" />
42 <path refid="USER_SOURCE_PATH" />
43 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000044
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000045 <path id="DOC_PATH">
46 <pathelement location="./src" />
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000047 <pathelement location="${gwt.build.lib}/gwt-doctool.jar" />
gwt.team.scottb66242e92006-12-11 22:25:16 +000048 <path path="${java.tools.path}" />
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000049 <path refid="USER_SOURCE_PATH" />
50 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000051
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000052 <target name="doc">
gwt.team.jatd4758962007-02-28 20:26:52 +000053 <outofdate>
54 <sourcefiles>
55 <fileset dir="./src">
gwt.team.bruce07598d32007-04-03 22:14:32 +000056 <include name="**/*.java" />
gwt.team.jatd4758962007-02-28 20:26:52 +000057 </fileset>
58 <fileset dir="${gwt.root}/user/src">
59 <include name="**/*.java" />
60 </fileset>
61 <fileset dir="${gwt.root}/user/javadoc">
62 <include name="**/*.java" />
63 </fileset>
64 <fileset dir="${gwt.root}/user/super">
65 <include name="**/*.java" />
66 </fileset>
67 <fileset dir="${gwt.root}/dev/core/src">
68 <include name="**/*.java" />
69 </fileset>
70 </sourcefiles>
71 <targetfiles>
72 <!--
73 only checks one output file, will not
74 rebuild other files if this one is up
75 to date
76 -->
77 <pathelement path="${project.build}/gwt-doc.doc.xml" />
78 </targetfiles>
79 <sequential>
80 <java classpathref="DOC_PATH" classname="com.google.doctool.DocTool" fork="yes" failonerror="true">
81 <arg value="doc" />
82 <arg value="gwt-doc" />
83 <arg value="-out" />
84 <arg value="${project.build}" />
85 <arg value="-classpath" />
86 <arg pathref="USER_CLASS_PATH" />
87 <arg value="-sourcepath" />
88 <arg pathref="DOC_SOURCE_PATH" />
89 <arg value="-packages" />
90 <arg value="${DOC_PKGS}" />
91 </java>
92 </sequential>
93 </outofdate>
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000094 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +000095
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000096 <target name="user">
gwt.team.jatd4758962007-02-28 20:26:52 +000097 <outofdate>
98 <sourcefiles>
99 <fileset file="./src/gwt-user.html" />
100 <fileset dir="${gwt.root}/user/src">
101 <include name="**/*.java" />
102 </fileset>
103 <fileset dir="${gwt.root}/user/javadoc">
104 <include name="**/*.java" />
105 </fileset>
106 <fileset dir="${gwt.root}/user/super">
107 <include name="**/*.java" />
108 </fileset>
109 <fileset dir="${gwt.root}/dev/core/src">
110 <include name="**/*.java" />
111 </fileset>
112 </sourcefiles>
113 <targetfiles>
114 <!--
115 only checks one output file, will not rebuild other files
116 if this one is up to date
117 -->
118 <pathelement path="${project.build}/gwt-user.java.xml" />
119 </targetfiles>
120 <sequential>
121 <move file="${gwt.root}/user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/GWTTestCase.java" tofile="${gwt.root}/user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/GWTTestCase.java_" failonerror="false" />
122 <java classpathref="DOC_PATH" classname="com.google.doctool.DocTool" fork="yes" failonerror="true">
123 <arg value="java" />
124 <arg value="gwt-user" />
125 <arg value="-out" />
126 <arg value="${project.build}" />
127 <arg value="-overview" />
128 <arg value="./src/gwt-user.html" />
129 <arg value="-classpath" />
130 <arg pathref="USER_CLASS_PATH" />
131 <arg value="-sourcepath" />
132 <arg pathref="USER_SOURCE_PATH" />
133 <arg value="-packages" />
134 <arg value="${USER_PKGS}" />
135 </java>
136 <move file="${gwt.root}/user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/GWTTestCase.java_" tofile="${gwt.root}/user/super/com/google/gwt/junit/translatable/com/google/gwt/junit/client/GWTTestCase.java" failonerror="false" />
137 </sequential>
138 </outofdate>
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000139 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +0000140
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000141 <target name="lang">
gwt.team.jatd4758962007-02-28 20:26:52 +0000142 <outofdate>
143 <sourcefiles>
144 <fileset file="./src/gwt-lang.html" />
145 <fileset dir="${gwt.root}/user/super/com/google/gwt/emul">
146 <include name="**/*.java" />
147 </fileset>
148 </sourcefiles>
149 <targetfiles>
150 <!--
151 only checks one output file, will not rebuild other files
152 if this one is up to date
153 -->
154 <pathelement path="${project.build}/gwt-lang.java.xml" />
155 </targetfiles>
156 <sequential>
157 <java classpathref="DOC_PATH" classname="com.google.doctool.DocTool" fork="yes" failonerror="true">
158 <arg value="java" />
159 <arg value="gwt-lang" />
160 <arg value="-out" />
161 <arg value="${project.build}" />
162 <arg value="-overview" />
163 <arg value="./src/gwt-lang.html" />
164 <arg value="-classpath" />
165 <arg pathref="USER_CLASS_PATH" />
166 <arg value="-sourcepath" />
167 <arg path="${gwt.root}/user/super/com/google/gwt/emul" />
168 <arg value="-packages" />
169 <arg value="${LANG_PKGS}" />
170 </java>
171 </sequential>
172 </outofdate>
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000173 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +0000174
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000175 <target name="html" depends="doc,user,lang">
gwt.team.jatd4758962007-02-28 20:26:52 +0000176 <outofdate>
177 <sourcefiles>
178 <fileset dir="${project.build}">
179 <include name="gwt-*.xml" />
180 </fileset>
181 </sourcefiles>
182 <targetfiles>
183 <!--
184 only checks one output file, will not rebuild other
185 files if this one is up to date
186 -->
187 <pathelement path="${project.build}/topics.xml" />
188 </targetfiles>
189 <sequential>
190 <java classpathref="DOC_PATH" classname="com.google.doctool.DocTool" fork="yes" failonerror="true">
191 <arg value="-html" />
gwt.team.bruce4b500c12007-08-15 22:29:15 +0000192 <arg value="Google Web Toolkit" />
gwt.team.jatd4758962007-02-28 20:26:52 +0000193 <arg value="gwt-doc" />
194 <arg value="gwt-user" />
195 <arg value="gwt-lang" />
196 <arg value="-out" />
197 <arg value="${project.build}" />
198 <arg value="-imagepath" />
199 <arg path="./src" />
200 </java>
201 <delete file="${project.build}/html/topics.htmls" />
202 <mkdir dir="${project.build}/css" />
203 <copy todir="${project.build}/css">
204 <fileset dir="src" includes="*.css" />
205 </copy>
gwt.team.bruce4b500c12007-08-15 22:29:15 +0000206
207 <!-- Manually copy handwritten HTML and apply the version/build number -->
208 <copy todir="${project.build}/html">
209 <fileset dir="src" includes="gettingstarted.html"/>
210 <filterset>
211 <filter token="GWT_VERSION" value="${gwt.version}" />
212 </filterset>
213 </copy>
214
215 <!-- Manually copy any other static resources (e.g. images) needed by handwritten HTML -->
216 <copy todir="${project.build}/html">
217 <fileset dir="src" includes="kitchensink-*.jpg"/>
218 <fileset dir="src" includes="myapplication-*.jpg"/>
219 </copy>
gwt.team.jatd4758962007-02-28 20:26:52 +0000220 </sequential>
221 </outofdate>
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000222 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +0000223
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000224 <target name="javadoc">
gwt.team.jatd4758962007-02-28 20:26:52 +0000225 <outofdate>
226 <sourcefiles>
227 <fileset file="./src/gwt-user.html" />
228 <fileset dir="${gwt.root}/user/src">
229 <include name="**/*.java" />
230 </fileset>
231 <fileset dir="${gwt.root}/user/javadoc">
232 <include name="**/*.java" />
233 </fileset>
234 <fileset dir="${gwt.root}/user/super">
235 <include name="**/*.java" />
236 </fileset>
237 <fileset dir="${gwt.root}/dev/core/src">
238 <include name="**/*.java" />
239 </fileset>
240 </sourcefiles>
241 <targetfiles>
242 <!--
243 only checks one output file, will not rebuild other
244 files if this one is up to date
245 -->
246 <pathelement path="${project.build}/javadoc/index.html" />
247 </targetfiles>
248 <sequential>
249 <echo>Building javadoc</echo>
250 <java classpathref="DOC_PATH" classname="com.google.doctool.custom.GWTJavaDoclet" fork="yes" failonerror="true">
251 <arg value="-quiet" />
252 <arg value="-source" />
gwt.team.scottb452a7e32007-08-21 02:34:57 +0000253 <arg value="1.5" />
gwt.team.bruce07598d32007-04-03 22:14:32 +0000254 <arg value="-encoding"/>
255 <arg value="UTF-8"/>
gwt.team.jatd4758962007-02-28 20:26:52 +0000256 <arg value="-d" />
257 <arg value="${project.build}/javadoc" />
258 <arg value="-classpath" />
259 <arg pathref="USER_CLASS_PATH" />
260 <arg value="-sourcepath" />
261 <arg pathref="USER_SOURCE_PATH" />
262 <arg value="-examplepackages" />
gwt.team.mmendez4449b342007-04-10 19:41:44 +0000263 <arg value="com.google.gwt.examples;com.google.gwt.examples.i18n;com.google.gwt.examples.http.client;com.google.gwt.examples.rpc.server;com.google.gwt.examples.benchmarks" />
gwt.team.jatd4758962007-02-28 20:26:52 +0000264 <arg value="-packages" />
265 <arg value="${USER_PKGS}" />
266 </java>
267 </sequential>
268 </outofdate>
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000269 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +0000270
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000271 <target name="build" depends="html, javadoc" />
gwt.team.jgw89075d42006-12-08 20:51:13 +0000272</project>