blob: f4f40dcd30cf6a9f4405eee2296a30b70aea38f7 [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 -->
jat@google.com0b1619e2009-09-20 19:33:31 +000010 <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" />
gwt.team.jgw89075d42006-12-08 20:51:13 +000011
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000012 <property name="USER_PKGS"
bobv@google.com0b8ac1f2009-10-10 20:50:44 +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.soyc;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.client.constants;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.benchmarks.client;com.google.gwt.resources.client;com.google.gwt.resources.ext;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"/>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000014 <property name="LANG_PKGS" value="java.lang;java.lang.annotation;java.util;java.io;java.sql" />
gwt.team.jgw89075d42006-12-08 20:51:13 +000015
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000016 <!-- Individual classes to include when we don't want to
17 include an entire package.
18 -->
19 <property name="USER_CLASSES"
20 value="${gwt.root}/user/src/com/google/gwt/junit/tools/GWTTestSuite.java" />
scottb@google.com6435ea22008-06-11 01:12:18 +000021
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000022 <!--
23 *** Note that if the USER_SOURCE_PATH paths are updated,
24 the fileset dependencies in the outofdate tags in the
25 javadoc target must be updated as well.
26 -->
27 <path id="USER_SOURCE_PATH">
28 <pathelement location="${gwt.root}/user/src" />
29 <pathelement location="${gwt.root}/user/javadoc" />
30 <pathelement location="${gwt.root}/user/super" />
31 <pathelement location="${gwt.root}/dev/core/src" />
32 <pathelement location="${gwt.root}/dev/core/super" />
33 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000034
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000035 <path id="USER_CLASS_PATH">
36 <pathelement location="${gwt.user.jar}" />
37 <pathelement location="${gwt.dev.jar}" />
38 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
39 <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
40 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000041
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000042 <path id="DOC_PATH">
43 <pathelement location="./src" />
44 <pathelement location="${gwt.build.lib}/gwt-doctool.jar" />
45 <path path="${java.tools.path}" />
46 <path refid="USER_SOURCE_PATH" />
47 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000048
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000049 <target name="javadoc">
50 <outofdate>
51 <sourcefiles>
52 <fileset file="./src/gwt-user.html" />
53 <fileset dir="${gwt.root}/user/src">
54 <include name="**/*.java" />
55 </fileset>
56 <fileset dir="${gwt.root}/user/javadoc">
57 <include name="**/*.java" />
58 </fileset>
59 <fileset dir="${gwt.root}/user/super">
60 <include name="**/*.java" />
61 </fileset>
62 <fileset dir="${gwt.root}/dev/core/src">
63 <include name="**/*.java" />
64 </fileset>
65 <fileset dir="${gwt.root}/dev/core/super">
66 <include name="**/*.java" />
67 </fileset>
68 </sourcefiles>
69 <targetfiles>
70 <!--
71 only checks one output file, will not rebuild other
72 files if this one is up to date
73 -->
74 <pathelement path="${project.build}/javadoc/index.html" />
75 </targetfiles>
76 <sequential>
77 <echo>Building javadoc</echo>
78 <java classpathref="DOC_PATH" classname="com.google.doctool.custom.GWTJavaDoclet" fork="yes" failonerror="true">
bobv@google.com855126e2008-12-02 03:36:51 +000079 <jvmarg value="-Xmx256M" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000080 <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>