blob: 344aa28cc531f8fd77ff0fb9cd6470a2f5fbee83 [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.jat3a9d9cc2008-03-17 23:50:16 +000012 <property name="USER_PKGS"
13 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.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.server.rpc;com.google.gwt.xml.client;com.google.gwt.http.client;com.google.gwt.junit.viewer.client" />
scottb@google.comee1c8bb2008-02-11 17:27:41 +000014 <property name="LANG_PKGS" value="java.lang;java.lang.annotation;java.util;java.io" />
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" />
scottb@google.com612b3742008-01-30 03:35:23 +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.scottb6ba31b82006-12-08 23:38:16 +000035 <path id="DOC_PATH">
36 <pathelement location="./src" />
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000037 <pathelement location="${gwt.build.lib}/gwt-doctool.jar" />
gwt.team.scottb66242e92006-12-11 22:25:16 +000038 <path path="${java.tools.path}" />
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000039 <path refid="USER_SOURCE_PATH" />
40 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000041
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000042 <target name="javadoc">
gwt.team.jatd4758962007-02-28 20:26:52 +000043 <outofdate>
44 <sourcefiles>
45 <fileset file="./src/gwt-user.html" />
46 <fileset dir="${gwt.root}/user/src">
47 <include name="**/*.java" />
48 </fileset>
49 <fileset dir="${gwt.root}/user/javadoc">
50 <include name="**/*.java" />
51 </fileset>
52 <fileset dir="${gwt.root}/user/super">
53 <include name="**/*.java" />
54 </fileset>
55 <fileset dir="${gwt.root}/dev/core/src">
56 <include name="**/*.java" />
57 </fileset>
58 </sourcefiles>
59 <targetfiles>
60 <!--
61 only checks one output file, will not rebuild other
62 files if this one is up to date
63 -->
64 <pathelement path="${project.build}/javadoc/index.html" />
65 </targetfiles>
66 <sequential>
67 <echo>Building javadoc</echo>
68 <java classpathref="DOC_PATH" classname="com.google.doctool.custom.GWTJavaDoclet" fork="yes" failonerror="true">
69 <arg value="-quiet" />
70 <arg value="-source" />
gwt.team.scottb452a7e32007-08-21 02:34:57 +000071 <arg value="1.5" />
gwt.team.bruce07598d32007-04-03 22:14:32 +000072 <arg value="-encoding"/>
73 <arg value="UTF-8"/>
gwt.team.jatd4758962007-02-28 20:26:52 +000074 <arg value="-d" />
75 <arg value="${project.build}/javadoc" />
76 <arg value="-classpath" />
77 <arg pathref="USER_CLASS_PATH" />
78 <arg value="-sourcepath" />
79 <arg pathref="USER_SOURCE_PATH" />
80 <arg value="-examplepackages" />
gwt.team.mmendez4449b342007-04-10 19:41:44 +000081 <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 +000082 <arg value="-packages" />
83 <arg value="${USER_PKGS}" />
84 </java>
85 </sequential>
86 </outofdate>
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000087 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +000088
scottb@google.comee1c8bb2008-02-11 17:27:41 +000089 <target name="wiki-lang">
90 <outofdate>
91 <sourcefiles>
92 <fileset file="./src/RefJreHeader.wiki" />
93 <fileset dir="${gwt.root}/user/super/com/google/gwt/emul">
94 <include name="**/*.java" />
95 </fileset>
96 </sourcefiles>
97 <targetfiles>
98 <pathelement path="${project.build}/wiki/RefJreEmulation.wiki" />
99 </targetfiles>
100 <sequential>
101 <java classpathref="DOC_PATH" classname="com.google.doctool.JreDocTool" fork="yes" failonerror="true">
102 <arg value="-out" />
103 <arg value="${project.build}/wiki/RefJreEmulation.wiki" />
104 <arg value="-header" />
105 <arg value="./src/RefJreHeader.wiki" />
106 <arg value="-classpath" />
107 <arg pathref="USER_CLASS_PATH" />
108 <arg value="-sourcepath" />
109 <arg path="${gwt.root}/user/super/com/google/gwt/emul" />
110 <arg value="-packages" />
111 <arg value="${LANG_PKGS}" />
112 </java>
113 </sequential>
114 </outofdate>
115 </target>
116
117 <target name="build" depends="javadoc, wiki-lang" />
gwt.team.jgw89075d42006-12-08 20:51:13 +0000118</project>