blob: a79ba555fa9ef479ae20cdd1bdbbcdd23eb2f9a7 [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.jgw89075d42006-12-08 20:51:13 +000013
gwt.team.jatd4758962007-02-28 20:26:52 +000014 <!--
15 *** Note that if the USER_SOURCE_PATH paths are updated,
16 the fileset dependencies in the outofdate tags in the doc,
17 user, and javadoc targets must be updated as well.
18 -->
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000019 <path id="USER_SOURCE_PATH">
20 <pathelement location="${gwt.root}/user/src" />
21 <pathelement location="${gwt.root}/user/javadoc" />
22 <pathelement location="${gwt.root}/user/super" />
23 <pathelement location="${gwt.root}/dev/core/src" />
24 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000025
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000026 <path id="USER_CLASS_PATH">
27 <pathelement location="${gwt.user.jar}" />
28 <pathelement location="${gwt.dev.jar}" />
29 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
scottb@google.com612b3742008-01-30 03:35:23 +000030 <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000031 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000032
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000033 <path id="DOC_PATH">
34 <pathelement location="./src" />
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000035 <pathelement location="${gwt.build.lib}/gwt-doctool.jar" />
gwt.team.scottb66242e92006-12-11 22:25:16 +000036 <path path="${java.tools.path}" />
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000037 <path refid="USER_SOURCE_PATH" />
38 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000039
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000040 <target name="javadoc">
gwt.team.jatd4758962007-02-28 20:26:52 +000041 <outofdate>
42 <sourcefiles>
43 <fileset file="./src/gwt-user.html" />
44 <fileset dir="${gwt.root}/user/src">
45 <include name="**/*.java" />
46 </fileset>
47 <fileset dir="${gwt.root}/user/javadoc">
48 <include name="**/*.java" />
49 </fileset>
50 <fileset dir="${gwt.root}/user/super">
51 <include name="**/*.java" />
52 </fileset>
53 <fileset dir="${gwt.root}/dev/core/src">
54 <include name="**/*.java" />
55 </fileset>
56 </sourcefiles>
57 <targetfiles>
58 <!--
59 only checks one output file, will not rebuild other
60 files if this one is up to date
61 -->
62 <pathelement path="${project.build}/javadoc/index.html" />
63 </targetfiles>
64 <sequential>
65 <echo>Building javadoc</echo>
66 <java classpathref="DOC_PATH" classname="com.google.doctool.custom.GWTJavaDoclet" fork="yes" failonerror="true">
67 <arg value="-quiet" />
68 <arg value="-source" />
gwt.team.scottb452a7e32007-08-21 02:34:57 +000069 <arg value="1.5" />
gwt.team.bruce07598d32007-04-03 22:14:32 +000070 <arg value="-encoding"/>
71 <arg value="UTF-8"/>
gwt.team.jatd4758962007-02-28 20:26:52 +000072 <arg value="-d" />
73 <arg value="${project.build}/javadoc" />
74 <arg value="-classpath" />
75 <arg pathref="USER_CLASS_PATH" />
76 <arg value="-sourcepath" />
77 <arg pathref="USER_SOURCE_PATH" />
78 <arg value="-examplepackages" />
gwt.team.mmendez4449b342007-04-10 19:41:44 +000079 <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 +000080 <arg value="-packages" />
81 <arg value="${USER_PKGS}" />
82 </java>
83 </sequential>
84 </outofdate>
gwt.team.scottb6ba31b82006-12-08 23:38:16 +000085 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +000086
scottb@google.com612b3742008-01-30 03:35:23 +000087 <target name="build" depends="javadoc" />
gwt.team.jgw89075d42006-12-08 20:51:13 +000088</project>