| <project name="GWT" default="dist" basedir="."> | |
| <property name="gwt.root" location="." /> | |
| <property name="project.tail" value="" /> | |
| <import file="${gwt.root}/common.ant.xml" /> | |
| <!-- "build" is the default when subprojects are directly targetted --> | |
| <property name="target" value="build" /> | |
| <!-- | |
| Convenience for the descending calls we make. Use gwt.ant to | |
| call into another directory, and this to call in the same build.xml | |
| --> | |
| <macrodef name="call-subproject"> | |
| <attribute name="subproject" /> | |
| <attribute name="subtarget" /> | |
| <sequential> | |
| <antcall target="@{subproject}"> | |
| <param name="target" value="@{subtarget}" /> | |
| </antcall> | |
| </sequential> | |
| </macrodef> | |
| <property name="gwt.apicheck.config" | |
| location="tools/api-checker/config/gwt16_20userApi.conf"/> | |
| <target name="buildonly" depends="dev-one, user, servlet, jni-one" | |
| description="Minimal one-platform devel build, without distro packaging"> | |
| </target> | |
| <target name="dist" depends="build, doc" description="Make all the distributions"> | |
| <gwt.ant dir="distro-source" /> | |
| </target> | |
| <target name="dist-one" depends="buildonly, tools, samples, doc" description="Make only this platform's distribution"> | |
| <gwt.ant dir="distro-source" target="${build.host.platform}" /> | |
| </target> | |
| <target name="dist-dev" depends="buildonly" description="Make this platform's distribution, minus doc and samples"> | |
| <gwt.ant dir="distro-source" target="${build.host.platform}" /> | |
| </target> | |
| <target name="dev" depends="buildtools" description="Builds (or runs ${target} if set) all the dev libraries"> | |
| <gwt.ant dir="dev" /> | |
| </target> | |
| <target name="dev-one" depends="buildtools" description="Builds only the dev library for this platform"> | |
| <gwt.ant dir="dev" target="${build.host.platform}"/> | |
| <gwt.ant dir="dev" target="oophm"/> | |
| </target> | |
| <target name="user" depends="buildtools, dev-one" description="Builds (or runs ${target} if set) only the user library"> | |
| <gwt.ant dir="user" /> | |
| </target> | |
| <target name="tools" depends="buildtools, user" description="Builds (or runs ${target} if set) only the tools"> | |
| <gwt.ant dir="tools" /> | |
| </target> | |
| <target name="servlet" depends="buildtools, user" description="Builds (or runs ${target} if set) only the servlet jar"> | |
| <gwt.ant dir="servlet" /> | |
| </target> | |
| <target name="jni" description="Builds (or runs ${target} if set) jni for all platforms"> | |
| <gwt.ant dir="jni" /> | |
| </target> | |
| <target name="jni-one" description="Builds jni for only this platform"> | |
| <gwt.ant dir="jni" target="${build.host.platform}" /> | |
| </target> | |
| <target name="doc" depends="buildtools, user" description="Builds (or runs ${target} if set) the doc"> | |
| <gwt.ant dir="doc" /> | |
| </target> | |
| <target name="samples" depends="dev-one, user" description="Builds (or runs ${target} if set) the samples"> | |
| <gwt.ant dir="samples" /> | |
| </target> | |
| <target name="buildtools" description="Build (or runs ${target} if set) the build tools"> | |
| <gwt.ant dir="build-tools" /> | |
| </target> | |
| <target name="build" description="Builds GWT, including samples, but without distro packaging" | |
| depends="dev, user, servlet, tools, jni, samples"> | |
| </target> | |
| <target name="checkstyle" description="Does static analysis of GWT source"> | |
| <call-subproject subproject="buildtools" subtarget="checkstyle" /> | |
| <call-subproject subproject="dev" subtarget="checkstyle" /> | |
| <call-subproject subproject="user" subtarget="checkstyle" /> | |
| <call-subproject subproject="servlet" subtarget="checkstyle" /> | |
| <call-subproject subproject="tools" subtarget="checkstyle" /> | |
| <call-subproject subproject="samples" subtarget="checkstyle" /> | |
| </target> | |
| <target name="test" depends="dist-dev" description="Runs all the GWT tests"> | |
| <call-subproject subproject="buildtools" subtarget="test" /> | |
| <call-subproject subproject="dev" subtarget="test" /> | |
| <call-subproject subproject="user" subtarget="test" /> | |
| <call-subproject subproject="servlet" subtarget="test" /> | |
| <call-subproject subproject="tools" subtarget="test" /> | |
| </target> | |
| <target name="clean" description="Cleans the entire GWT build"> | |
| <delete dir="${gwt.build}" /> | |
| </target> | |
| <target name ="presubmit" description="Runs checkstyle,apichecker, and all tests" depends="test,apicheck-nobuild,checkstyle"> | |
| </target> | |
| <target name="apicheck-nobuild" | |
| description="Checks API compatibility to prior GWT revision"> | |
| <copy tofile="${gwt.build.out}/userApi.conf" filtering="false" | |
| file="${gwt.apicheck.config}" | |
| overwrite="true"> | |
| </copy> | |
| <java failonerror="true" fork="true" | |
| classname="com.google.gwt.tools.apichecker.ApiCompatibilityChecker"> | |
| <jvmarg line="-Xmx512m" /> | |
| <sysproperty key="gwt.devjar" value="${gwt.dev.staging.jar}" /> | |
| <classpath> | |
| <pathelement location="${gwt.build.out}/tools/api-checker/bin"/> | |
| <fileset dir="${gwt.build.lib}" includes="gwt-user.jar,gwt-dev-*.jar" /> | |
| <pathelement path="${java.class.path}"/> | |
| <pathelement location="${gwt.tools.lib}/apache/ant-1.6.5.jar" /> | |
| </classpath> | |
| <arg value="-refJar"/> | |
| <arg value="${gwt.root}/tools/api-checker/reference/gwt-dev-modified.jar:${gwt.root}/tools/api-checker/reference/gwt-user-modified.jar"/> | |
| <arg value="-configFile"/> | |
| <arg file="${gwt.build.out}/userApi.conf"/> | |
| <arg value="-logLevel"/> | |
| <arg value="ERROR"/> | |
| </java> | |
| </target> | |
| <target name="apicheck" depends="build,apicheck-nobuild" | |
| description="Builds GWT and checks API compatiblity to prior release"/> | |
| </project> |