blob: bad7399c2416303cc9707e4a95da821dfe333329 [file] [log] [blame]
<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" />
<property name="emma.merged.out" value="${}/emma-coverage" />
Convenience for the lateral calls we make. Use gwt.ant to
descend into another directory, and this to call in the same build.xml.
NOTE THE USE OF $TARGET, here and in common's gwt.ant. This has the
effect of dividing rules into subdirectory rules (using gwt.ant and
sensitive to $target) and action rules (using call-subproject and
setting $target)... but it is Bad for a subdirectory rule to depend
on another one, as they are both sensitive to $target, but you probably
mean that subdirB needed subdirA to be _built_, not $target'ed (tested,
<macrodef name="call-subproject">
<attribute name="subproject" />
<attribute name="subtarget" />
<antcall target="@{subproject}">
<param name="target" value="@{subtarget}" />
<property name="gwt.apicheck.config"
<target name="buildonly"
description="[action] Minimal one-platform devel build, without distro packaging">
<call-subproject subproject="dev-one" subtarget="build" />
<call-subproject subproject="user" subtarget="build" />
<call-subproject subproject="servlet" subtarget="build" />
<call-subproject subproject="jni-one" subtarget="build" />
<target name="dist" depends="build, doc" description="[action] Make all the distributions">
<gwt.ant dir="distro-source" />
<target name="dist-one" depends="buildonly, tools, samples, doc" description="[action] Make only this platform's distribution">
<gwt.ant dir="distro-source" target="${}" />
<target name="dist-dev" depends="buildonly" description="[action] Make this platform's distribution, minus doc and samples">
<gwt.ant dir="distro-source" target="${}" />
<target name="dev" description="[subdir] Builds (or runs ${target} if set) all the dev libraries">
<call-subproject subproject="buildtools" subtarget="build" />
<gwt.ant dir="dev" />
<target name="dev-one" description="[subdir] Builds only the dev library for this platform">
<call-subproject subproject="buildtools" subtarget="build" />
<gwt.ant dir="dev" target="${}"/>
<gwt.ant dir="dev" target="oophm"/>
<target name="user" description="[subdir] Builds (or runs ${target} if set) only the user library">
<call-subproject subproject="dev-one" subtarget="build"/>
<gwt.ant dir="user" />
<target name="tools" description="[subdir] Builds (or runs ${target} if set) only the tools">
<call-subproject subproject="user" subtarget="build"/>
<gwt.ant dir="tools" />
<target name="servlet" description="[subdir] Builds (or runs ${target} if set) only the servlet jar">
<call-subproject subproject="user" subtarget="build" />
<gwt.ant dir="servlet" />
<target name="jni" description="[subdir] Builds (or runs ${target} if set) jni for all platforms">
<gwt.ant dir="jni" />
<target name="jni-one" description="[subdir] Builds jni for only this platform">
<gwt.ant dir="jni" target="${}" />
<target name="doc" description="[subdir] Builds (or runs ${target} if set) the doc">
<call-subproject subproject="user" subtarget="build" />
<gwt.ant dir="doc" />
<target name="samples" description="[subdir] Builds (or runs ${target} if set) the samples">
<call-subproject subproject="user" subtarget="build" />
<gwt.ant dir="samples" />
<target name="buildtools" description="[subdir] Build (or runs ${target} if set) the build tools">
<gwt.ant dir="build-tools" />
<target name="build" description="[action] Builds GWT, including samples, but without distro packaging">
<call-subproject subproject="dev" subtarget="build"/>
<call-subproject subproject="user" subtarget="build"/>
<call-subproject subproject="servlet" subtarget="build"/>
<call-subproject subproject="tools" subtarget="build"/>
<call-subproject subproject="jni" subtarget="build"/>
<call-subproject subproject="samples" subtarget="build"/>
<target name="checkstyle" description="[action] 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 name="test" depends="dist-dev,apicheck,checkstyle"
description="[action] Runs all the GWT tests, including checkstyle and apicheck">
<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" />
<path id="emma.classpath.src">
<pathelement location="${gwt.root}/user/src" />
<pathelement location="${gwt.root}/dev/**/src/com/google" />
<pathelement location="${gwt.root}/build-tools/**/src/com/google" />
<pathelement location="${gwt.root}/tools/**/src/com/google" />
<target name="emma.merge" description="Merges coverage data for all projects">
<delete dir="${emma.merged.out}" />
<mkdir dir="${emma.merged.out}" />
<merge outfile="${emma.merged.out}/merged.emma" >
<fileset dir="${}">
<include name="**/*.emma" />
<exclude name="**/merged.emma" />
<report sourcepath="${emma.classpath.src}">
<fileset dir="${}">
<include name="**/metadata.emma"/>
<fileset file="${emma.merged.out}/merged.emma" />
<txt outfile="${emma.merged.out}/coverage.txt" />
<html outfile="${emma.merged.out}/coverage.html" />
<xml outfile="${emma.merged.out}/coverage.xml" />
<target name="clean" description="[action] Cleans the entire GWT build">
<delete dir="${}" />
<target name ="presubmit" description="[action] Deprecated for test, which now does checkstyle and apicheck"
<target name="apicheck-nobuild"
description="[action] Checks API compatibility to prior GWT revision">
<copy tofile="${}/userApi.conf" filtering="false"
<java failonerror="true" fork="true"
<jvmarg line="-Xmx512m" />
<sysproperty key="gwt.devjar" value="${}" />
<pathelement location="${}/tools/api-checker/bin"/>
<fileset dir="${}" includes="gwt-user.jar,gwt-dev-*.jar" />
<pathelement path="${java.class.path}"/>
<pathelement location="${}/apache/ant-1.6.5.jar" />
<arg value="-refJar"/>
<arg path="${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="${}/userApi.conf"/>
<arg value="-logLevel"/>
<arg value="ERROR"/>
<target name="apicheck" depends="buildonly,tools,apicheck-nobuild"
description="[action] Builds GWT and checks API compatiblity to prior release"/>