blob: 622d0cba948239173fa3c3c8cd50bf35c73189de [file] [log] [blame]
gwt.team.jgw89075d42006-12-08 20:51:13 +00001<project name="doc" default="all" basedir=".">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +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
fabbott@google.com0e2dc6282008-08-22 16:09:01 +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." />
gwt.team.scottb428b2632006-12-12 22:40:34 +00007
fabbott@google.com0e2dc6282008-08-22 16:09:01 +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
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000012 <property name="USER_PKGS"
fabbott@google.comf11e7422009-02-03 18:40:07 +000013 value="com.google.gwt.animation.client;com.google.gwt.benchmarks.client;com.google.gwt.core.client;com.google.gwt.core.ext;com.google.gwt.core.ext.linker;com.google.gwt.core.ext.typeinfo;com.google.gwt.debug.client;com.google.gwt.dom.client;com.google.gwt.event.dom.client;com.google.gwt.event.logical.shared;com.google.gwt.event.shared;com.google.gwt.http.client;com.google.gwt.i18n.client;com.google.gwt.i18n.rebind.format;com.google.gwt.i18n.rebind.keygen;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.datepicker.client;com.google.gwt.user.server.rpc;com.google.gwt.xml.client" />
14
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000015 <property name="LANG_PKGS" value="java.lang;java.lang.annotation;java.util;java.io;java.sql" />
gwt.team.jgw89075d42006-12-08 20:51:13 +000016
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000017 <!-- Individual classes to include when we don't want to
18 include an entire package.
19 -->
20 <property name="USER_CLASSES"
21 value="${gwt.root}/user/src/com/google/gwt/junit/tools/GWTTestSuite.java" />
scottb@google.com6435ea22008-06-11 01:12:18 +000022
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000023 <!--
24 *** Note that if the USER_SOURCE_PATH paths are updated,
25 the fileset dependencies in the outofdate tags in the
26 javadoc target must be updated as well.
27 -->
28 <path id="USER_SOURCE_PATH">
29 <pathelement location="${gwt.root}/user/src" />
30 <pathelement location="${gwt.root}/user/javadoc" />
31 <pathelement location="${gwt.root}/user/super" />
32 <pathelement location="${gwt.root}/dev/core/src" />
33 <pathelement location="${gwt.root}/dev/core/super" />
34 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000035
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000036 <path id="USER_CLASS_PATH">
37 <pathelement location="${gwt.user.jar}" />
38 <pathelement location="${gwt.dev.jar}" />
39 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
40 <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
41 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000042
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000043 <path id="DOC_PATH">
44 <pathelement location="./src" />
45 <pathelement location="${gwt.build.lib}/gwt-doctool.jar" />
46 <path path="${java.tools.path}" />
47 <path refid="USER_SOURCE_PATH" />
48 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000049
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000050 <target name="javadoc">
51 <outofdate>
52 <sourcefiles>
53 <fileset file="./src/gwt-user.html" />
54 <fileset dir="${gwt.root}/user/src">
55 <include name="**/*.java" />
56 </fileset>
57 <fileset dir="${gwt.root}/user/javadoc">
58 <include name="**/*.java" />
59 </fileset>
60 <fileset dir="${gwt.root}/user/super">
61 <include name="**/*.java" />
62 </fileset>
63 <fileset dir="${gwt.root}/dev/core/src">
64 <include name="**/*.java" />
65 </fileset>
66 <fileset dir="${gwt.root}/dev/core/super">
67 <include name="**/*.java" />
68 </fileset>
69 </sourcefiles>
70 <targetfiles>
71 <!--
72 only checks one output file, will not rebuild other
73 files if this one is up to date
74 -->
75 <pathelement path="${project.build}/javadoc/index.html" />
76 </targetfiles>
77 <sequential>
78 <echo>Building javadoc</echo>
79 <java classpathref="DOC_PATH" classname="com.google.doctool.custom.GWTJavaDoclet" fork="yes" failonerror="true">
80 <arg value="-quiet" />
scottb@google.com566806a2008-08-29 00:03:51 +000081 <arg value="-notimestamp" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000082 <arg value="-source" />
83 <arg value="1.5" />
84 <arg value="-windowtitle" />
85 <arg value="Google Web Toolkit Javadoc" />
86 <arg value="-encoding"/>
87 <arg value="UTF-8"/>
88 <arg value="-d" />
89 <arg value="${project.build}/javadoc" />
90 <arg value="-classpath" />
91 <arg pathref="USER_CLASS_PATH" />
92 <arg value="-sourcepath" />
93 <arg pathref="USER_SOURCE_PATH" />
94 <arg value="-examplepackages" />
95 <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" />
96 <arg value="-packages" />
97 <arg value="${USER_PKGS};${USER_CLASSES}" />
98 </java>
99 </sequential>
100 </outofdate>
101 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +0000102
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000103 <target name="wiki-lang">
104 <outofdate>
105 <sourcefiles>
106 <fileset file="./src/RefJreHeader.wiki" />
107 <fileset dir="${gwt.root}/user/super/com/google/gwt/emul">
108 <include name="**/*.java" />
109 </fileset>
110 </sourcefiles>
111 <targetfiles>
112 <pathelement path="${project.build}/wiki/RefJreEmulation.wiki" />
113 </targetfiles>
114 <sequential>
115 <java classpathref="DOC_PATH" classname="com.google.doctool.JreDocTool" fork="yes" failonerror="true">
116 <arg value="-out" />
117 <arg value="${project.build}/wiki/RefJreEmulation.wiki" />
118 <arg value="-header" />
119 <arg value="./src/RefJreHeader.wiki" />
120 <arg value="-classpath" />
121 <arg pathref="USER_CLASS_PATH" />
122 <arg value="-sourcepath" />
bruce@google.com170d8782009-02-12 14:44:31 +0000123 <arg path="${gwt.root}/user/super/com/google/gwt/emul:${gwt.root}/dev/core/super/com/google/gwt/dev/jjs/intrinsic" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000124 <arg value="-packages" />
125 <arg value="${LANG_PKGS}" />
126 </java>
127 </sequential>
128 </outofdate>
129 </target>
scottb@google.comee1c8bb2008-02-11 17:27:41 +0000130
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000131 <target name="build" depends="javadoc, wiki-lang" />
gwt.team.jgw89075d42006-12-08 20:51:13 +0000132</project>