blob: 5be175f5ab48bd5c64d40577c920b1e8159c30fa [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 <!--
13 *** Note that if the USER_SOURCE_PATH paths are updated,
14 the fileset dependencies in the outofdate tags in the
15 javadoc target must be updated as well.
16 -->
17 <path id="USER_SOURCE_PATH">
18 <pathelement location="${gwt.root}/user/src" />
19 <pathelement location="${gwt.root}/user/javadoc" />
20 <pathelement location="${gwt.root}/user/super" />
21 <pathelement location="${gwt.root}/dev/core/src" />
22 <pathelement location="${gwt.root}/dev/core/super" />
23 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000024
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000025 <path id="USER_CLASS_PATH">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000026 <pathelement location="${gwt.dev.jar}" />
rice@google.com31697ab2010-10-13 10:51:52 +000027 <pathelement location="${gwt.user.jar}" />
fabbott@google.com9c875d72010-10-06 02:40:24 +000028 <pathelement location="${gwt.tools}/redist/json/r2_20080312/json-1.5.jar" />
fabbott@google.com618aafc2011-03-08 16:22:05 +000029 <pathelement location="${gwt.tools.lib}/junit/junit-4.8.2.jar" />
fabbott@google.com9c875d72010-10-06 02:40:24 +000030 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA.jar" />
rice@google.com31697ab2010-10-13 10:51:52 +000031 <pathelement location="${gwt.tools.lib}/javax/validation/validation-api-1.0.0.GA-sources.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000032 <pathelement location="${gwt.tools.lib}/jfreechart/jfreechart-1.0.3.jar" />
rice@google.com31697ab2010-10-13 10:51:52 +000033 <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000034 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000035
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000036 <path id="DOC_PATH">
37 <pathelement location="./src" />
38 <pathelement location="${gwt.build.lib}/gwt-doctool.jar" />
39 <path path="${java.tools.path}" />
40 <path refid="USER_SOURCE_PATH" />
41 </path>
gwt.team.jgw89075d42006-12-08 20:51:13 +000042
rice@google.com2d0463b2010-10-08 14:13:51 +000043 <!-- Rebuild the javadoc if a source file is newer than the index-->
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000044 <target name="javadoc">
45 <outofdate>
46 <sourcefiles>
47 <fileset file="./src/gwt-user.html" />
48 <fileset dir="${gwt.root}/user/src">
49 <include name="**/*.java" />
50 </fileset>
51 <fileset dir="${gwt.root}/user/javadoc">
52 <include name="**/*.java" />
53 </fileset>
54 <fileset dir="${gwt.root}/user/super">
55 <include name="**/*.java" />
56 </fileset>
57 <fileset dir="${gwt.root}/dev/core/src">
58 <include name="**/*.java" />
59 </fileset>
60 <fileset dir="${gwt.root}/dev/core/super">
61 <include name="**/*.java" />
62 </fileset>
63 </sourcefiles>
64 <targetfiles>
65 <!--
66 only checks one output file, will not rebuild other
67 files if this one is up to date
68 -->
69 <pathelement path="${project.build}/javadoc/index.html" />
70 </targetfiles>
71 <sequential>
72 <echo>Building javadoc</echo>
rice@google.com2d0463b2010-10-08 14:13:51 +000073 <antcall target="makeJavadoc" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000074 </sequential>
75 </outofdate>
76 </target>
gwt.team.jgw89075d42006-12-08 20:51:13 +000077
rice@google.com2d0463b2010-10-08 14:13:51 +000078 <!-- Really rebuild the javadoc -->
rice@google.com31697ab2010-10-13 10:51:52 +000079 <target name="makeJavadoc">
80 <java classpathref="DOC_PATH" classname="com.google.doctool.custom.FindPackages" fork="yes" failonerror="true">
81 <arg value="${gwt.root}" />
82 </java>
83 <property file="${gwt.root}/build/out/packages.properties" />
rice@google.com2d0463b2010-10-08 14:13:51 +000084 <java classpathref="DOC_PATH" classname="com.google.doctool.custom.GWTJavaDoclet" fork="yes" failonerror="true">
85 <jvmarg value="-Xmx1024m" />
86 <arg value="-quiet" />
87 <arg value="-notimestamp" />
rice@google.com31697ab2010-10-13 10:51:52 +000088 <arg value="-use" />
rice@google.com2d0463b2010-10-08 14:13:51 +000089 <arg value="-source" />
90 <arg value="1.5" />
91 <arg value="-windowtitle" />
92 <arg value="Google Web Toolkit Javadoc" />
93 <arg value="-doctitle" />
94 <arg value="Google Web Toolkit API Reference" />
95 <arg value="-header" />
96 <arg value="GWT ${gwt.version}" />
mrrussell@google.com8a1cb992011-07-12 15:08:43 +000097 <arg value="-package" />
rice@google.com2d0463b2010-10-08 14:13:51 +000098 <arg value="-encoding"/>
99 <arg value="UTF-8"/>
100 <arg value="-d" />
101 <arg value="${project.build}/javadoc" />
102 <arg value="-linkoffline" />
103 <arg value="http://download.oracle.com/javaee/6/api/" />
104 <arg value="validation-package-list" />
rice@google.com31697ab2010-10-13 10:51:52 +0000105 <arg value="-linkoffline" />
rice@google.com2d0463b2010-10-08 14:13:51 +0000106 <arg value="http://www.json.org/javadoc" />
rice@google.com31697ab2010-10-13 10:51:52 +0000107 <arg value="json-package-list" />
rice@google.com2d0463b2010-10-08 14:13:51 +0000108 <arg value="-classpath" />
109 <arg pathref="USER_CLASS_PATH" />
110 <arg value="-sourcepath" />
111 <arg pathref="USER_SOURCE_PATH" />
112 <arg value="-examplepackages" />
jlabanca@google.com7127d082011-06-28 22:49:07 +0000113 <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;com.google.gwt.examples.cell;com.google.gwt.examples.cellview;com.google.gwt.examples.view;com.google.gwt.examples.cellview;com.google.gwt.examples.dom.builder" />
rice@google.com2d0463b2010-10-08 14:13:51 +0000114 <arg value="-packages" />
115 <arg value="${USER_PKGS};${USER_CLASSES}" />
116 </java>
117 </target>
118
kplatfoot@google.com39e4d342010-01-25 18:18:32 +0000119 <target name="emul-ezt">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000120 <outofdate>
121 <sourcefiles>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000122 <fileset dir="${gwt.root}/user/super/com/google/gwt/emul">
123 <include name="**/*.java" />
124 </fileset>
125 </sourcefiles>
126 <targetfiles>
kplatfoot@google.com39e4d342010-01-25 18:18:32 +0000127 <pathelement path="${project.build}/emul-ezt/fragment.html" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000128 </targetfiles>
129 <sequential>
kplatfoot@google.com39e4d342010-01-25 18:18:32 +0000130 <echo>Building JRE emulation EZT</echo>
rice@google.com31697ab2010-10-13 10:51:52 +0000131 <java classpathref="DOC_PATH" classname="com.google.doctool.custom.FindPackages" fork="yes" failonerror="true">
132 <arg value="${gwt.root}" />
133 </java>
134 <property file="${gwt.root}/build/out/packages.properties" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000135 <java classpathref="DOC_PATH" classname="com.google.doctool.JreDocTool" fork="yes" failonerror="true">
136 <arg value="-out" />
kplatfoot@google.com39e4d342010-01-25 18:18:32 +0000137 <arg value="${project.build}/emul-ezt/fragment.html" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000138 <arg value="-classpath" />
139 <arg pathref="USER_CLASS_PATH" />
140 <arg value="-sourcepath" />
bruce@google.com170d8782009-02-12 14:44:31 +0000141 <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 +0000142 <arg value="-packages" />
rice@google.com6de05672011-02-16 13:59:14 +0000143 <arg value="${JAVA_PKGS}" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +0000144 </java>
145 </sequential>
146 </outofdate>
147 </target>
scottb@google.comee1c8bb2008-02-11 17:27:41 +0000148
kplatfoot@google.com39e4d342010-01-25 18:18:32 +0000149 <target name="build" depends="javadoc, emul-ezt" />
gwt.team.jgw89075d42006-12-08 20:51:13 +0000150</project>