blob: a9dab35fe947c98e9d329c377996dbff41426d26 [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.scottb6ba31b82006-12-08 23:38:16 +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" />
13 <property name="LANG_PKGS" value="java.lang;java.util" />
14 <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" />
32 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000033
gwt.team.jatd4758962007-02-28 20:26:52 +000034 <!--
35 *** Note that if the DOC_SOURCE_PATH paths are updated,
36 the fileset dependencies in the outofdate tags in the
37 doc target must be updated as well.
38 -->
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000039 <path id="DOC_SOURCE_PATH">
40 <pathelement location="./src" />
41 <path refid="USER_SOURCE_PATH" />
42 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000043
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000044 <path id="DOC_PATH">
45 <pathelement location="./src" />
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000046 <pathelement location="${gwt.build.lib}/gwt-doctool.jar" />
gwt.team.scottb66242e92006-12-11 22:25:16 +000047 <path path="${java.tools.path}" />
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000048 <path refid="USER_SOURCE_PATH" />
49 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000050
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000051 <target name="doc">
gwt.team.jatd4758962007-02-28 20:26:52 +000052 <outofdate>
53 <sourcefiles>
54 <fileset dir="./src">
55 <include name="**/*.java" />
56 </fileset>
57 <fileset dir="${gwt.root}/user/src">
58 <include name="**/*.java" />
59 </fileset>
60 <fileset dir="${gwt.root}/user/javadoc">
61 <include name="**/*.java" />
62 </fileset>
63 <fileset dir="${gwt.root}/user/super">
64 <include name="**/*.java" />
65 </fileset>
66 <fileset dir="${gwt.root}/dev/core/src">
67 <include name="**/*.java" />
68 </fileset>
69 </sourcefiles>
70 <targetfiles>
71 <!--
72 only checks one output file, will not
73 rebuild other files if this one is up
74 to date
75 -->
76 <pathelement path="${project.build}/gwt-doc.doc.xml" />
77 </targetfiles>
78 <sequential>
79 <java classpathref="DOC_PATH" classname="com.google.doctool.DocTool" fork="yes" failonerror="true">
80 <arg value="doc" />
81 <arg value="gwt-doc" />
82 <arg value="-out" />
83 <arg value="${project.build}" />
84 <arg value="-classpath" />
85 <arg pathref="USER_CLASS_PATH" />
86 <arg value="-sourcepath" />
87 <arg pathref="DOC_SOURCE_PATH" />
88 <arg value="-packages" />
89 <arg value="${DOC_PKGS}" />
90 </java>
91 </sequential>
92 </outofdate>
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000093 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +000094
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000095 <target name="user">
gwt.team.jatd4758962007-02-28 20:26:52 +000096 <outofdate>
97 <sourcefiles>
98 <fileset file="./src/gwt-user.html" />
99 <fileset dir="${gwt.root}/user/src">
100 <include name="**/*.java" />
101 </fileset>
102 <fileset dir="${gwt.root}/user/javadoc">
103 <include name="**/*.java" />
104 </fileset>
105 <fileset dir="${gwt.root}/user/super">
106 <include name="**/*.java" />
107 </fileset>
108 <fileset dir="${gwt.root}/dev/core/src">
109 <include name="**/*.java" />
110 </fileset>
111 </sourcefiles>
112 <targetfiles>
113 <!--
114 only checks one output file, will not rebuild other files
115 if this one is up to date
116 -->
117 <pathelement path="${project.build}/gwt-user.java.xml" />
118 </targetfiles>
119 <sequential>
120 <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" />
121 <java classpathref="DOC_PATH" classname="com.google.doctool.DocTool" fork="yes" failonerror="true">
122 <arg value="java" />
123 <arg value="gwt-user" />
124 <arg value="-out" />
125 <arg value="${project.build}" />
126 <arg value="-overview" />
127 <arg value="./src/gwt-user.html" />
128 <arg value="-classpath" />
129 <arg pathref="USER_CLASS_PATH" />
130 <arg value="-sourcepath" />
131 <arg pathref="USER_SOURCE_PATH" />
132 <arg value="-packages" />
133 <arg value="${USER_PKGS}" />
134 </java>
135 <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" />
136 </sequential>
137 </outofdate>
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000138 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +0000139
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000140 <target name="lang">
gwt.team.jatd4758962007-02-28 20:26:52 +0000141 <outofdate>
142 <sourcefiles>
143 <fileset file="./src/gwt-lang.html" />
144 <fileset dir="${gwt.root}/user/super/com/google/gwt/emul">
145 <include name="**/*.java" />
146 </fileset>
147 </sourcefiles>
148 <targetfiles>
149 <!--
150 only checks one output file, will not rebuild other files
151 if this one is up to date
152 -->
153 <pathelement path="${project.build}/gwt-lang.java.xml" />
154 </targetfiles>
155 <sequential>
156 <java classpathref="DOC_PATH" classname="com.google.doctool.DocTool" fork="yes" failonerror="true">
157 <arg value="java" />
158 <arg value="gwt-lang" />
159 <arg value="-out" />
160 <arg value="${project.build}" />
161 <arg value="-overview" />
162 <arg value="./src/gwt-lang.html" />
163 <arg value="-classpath" />
164 <arg pathref="USER_CLASS_PATH" />
165 <arg value="-sourcepath" />
166 <arg path="${gwt.root}/user/super/com/google/gwt/emul" />
167 <arg value="-packages" />
168 <arg value="${LANG_PKGS}" />
169 </java>
170 </sequential>
171 </outofdate>
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000172 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +0000173
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000174 <target name="html" depends="doc,user,lang">
gwt.team.jatd4758962007-02-28 20:26:52 +0000175 <outofdate>
176 <sourcefiles>
177 <fileset dir="${project.build}">
178 <include name="gwt-*.xml" />
179 </fileset>
180 </sourcefiles>
181 <targetfiles>
182 <!--
183 only checks one output file, will not rebuild other
184 files if this one is up to date
185 -->
186 <pathelement path="${project.build}/topics.xml" />
187 </targetfiles>
188 <sequential>
189 <java classpathref="DOC_PATH" classname="com.google.doctool.DocTool" fork="yes" failonerror="true">
190 <arg value="-html" />
191 <arg value="Google Web Toolkit (Beta)" />
192 <arg value="gwt-doc" />
193 <arg value="gwt-user" />
194 <arg value="gwt-lang" />
195 <arg value="-out" />
196 <arg value="${project.build}" />
197 <arg value="-imagepath" />
198 <arg path="./src" />
199 </java>
200 <delete file="${project.build}/html/topics.htmls" />
201 <mkdir dir="${project.build}/css" />
202 <copy todir="${project.build}/css">
203 <fileset dir="src" includes="*.css" />
204 </copy>
205 </sequential>
206 </outofdate>
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000207 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +0000208
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000209 <target name="javadoc">
gwt.team.jatd4758962007-02-28 20:26:52 +0000210 <outofdate>
211 <sourcefiles>
212 <fileset file="./src/gwt-user.html" />
213 <fileset dir="${gwt.root}/user/src">
214 <include name="**/*.java" />
215 </fileset>
216 <fileset dir="${gwt.root}/user/javadoc">
217 <include name="**/*.java" />
218 </fileset>
219 <fileset dir="${gwt.root}/user/super">
220 <include name="**/*.java" />
221 </fileset>
222 <fileset dir="${gwt.root}/dev/core/src">
223 <include name="**/*.java" />
224 </fileset>
225 </sourcefiles>
226 <targetfiles>
227 <!--
228 only checks one output file, will not rebuild other
229 files if this one is up to date
230 -->
231 <pathelement path="${project.build}/javadoc/index.html" />
232 </targetfiles>
233 <sequential>
234 <echo>Building javadoc</echo>
235 <java classpathref="DOC_PATH" classname="com.google.doctool.custom.GWTJavaDoclet" fork="yes" failonerror="true">
236 <arg value="-quiet" />
237 <arg value="-source" />
238 <arg value="1.4" />
239 <arg value="-d" />
240 <arg value="${project.build}/javadoc" />
241 <arg value="-classpath" />
242 <arg pathref="USER_CLASS_PATH" />
243 <arg value="-sourcepath" />
244 <arg pathref="USER_SOURCE_PATH" />
245 <arg value="-examplepackages" />
246 <arg value="com.google.gwt.examples;com.google.gwt.examples.i18n;com.google.gwt.examples.http.client" />
247 <arg value="-packages" />
248 <arg value="${USER_PKGS}" />
249 </java>
250 </sequential>
251 </outofdate>
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000252 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +0000253
gwt.team.scottb6ba31b82006-12-08 23:38:16 +0000254 <target name="build" depends="html, javadoc" />
gwt.team.jgw89075d42006-12-08 20:51:13 +0000255</project>
256