blob: 68c30a7e2a65f11f899cf71a4a74818b523a7784 [file] [log] [blame]
gwt.team.scottbb05c9002006-12-12 09:53:31 +00001<project name="ant-gwt" default="build" basedir=".">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +00002 <property name="gwt.root" location="../.." />
3 <property name="project.tail" value="build-tools/ant-gwt" />
4 <import file="${gwt.root}/common.ant.xml" />
gwt.team.scottbb05c9002006-12-12 09:53:31 +00005
fabbott@google.com0e2dc6282008-08-22 16:09:01 +00006 <target name="compile" description="Compiles this project">
7 <mkdir dir="${javac.out}" />
8 <gwt.javac>
9 <classpath>
10 <pathelement location="${gwt.tools.lib}/apache/ant-1.6.5.jar" />
11 </classpath>
12 </gwt.javac>
13 </target>
gwt.team.scottbb05c9002006-12-12 09:53:31 +000014
scottb@google.com359e55c2009-03-13 00:26:54 +000015 <target name="compile.tests" depends="build" description="Compiles the test code for this project">
16 <mkdir dir="${javac.junit.out}" />
17 <gwt.javac srcdir="test" destdir="${javac.junit.out}">
18 <classpath>
19 <pathelement location="${javac.out}" />
20 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
21 </classpath>
22 </gwt.javac>
23 </target>
24
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000025 <target name="build" depends="compile" description="Packages this project into a jar">
26 <mkdir dir="${gwt.build.lib}" />
27 <gwt.jar destfile="${gwt.build.lib}/${ant.project.name}.jar">
28 <fileset dir="src" />
29 <fileset dir="${javac.out}" />
30 </gwt.jar>
31 </target>
gwt.team.scottbb05c9002006-12-12 09:53:31 +000032
scottb@google.com359e55c2009-03-13 00:26:54 +000033 <target name="test" depends="build, compile.tests" description="Run unit tests for this project.">
34 <!-- TODO: refactor gwt.junit so it can be reused here -->
35 <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
36 <classpath>
37 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
38 <pathelement location="${gwt.tools.antlib}/ant-junit-1.6.5.jar" />
39 </classpath>
40 </taskdef>
41
42 <echo message="Writing test results to ${junit.out}/reports for ${test.cases}" />
43 <mkdir dir="${junit.out}/reports" />
44
45 <echo message="${javac.out} ${javac.junit.out}" />
46 <junit dir="${junit.out}" fork="yes" printsummary="yes" haltonfailure="true">
47 <classpath>
48 <pathelement location="${javac.junit.out}" />
49 <pathelement location="${javac.out}" />
50 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
51 </classpath>
52
53 <formatter type="plain" />
54 <formatter type="xml" />
55
56 <batchtest todir="${junit.out}/reports">
57 <fileset dir="${javac.junit.out}" includes="**/*Test.class" />
58 </batchtest>
59 </junit>
60 </target>
61
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000062 <target name="checkstyle" description="Static analysis of source">
63 <gwt.checkstyle>
64 <fileset dir="src" />
65 </gwt.checkstyle>
66 </target>
gwt.team.scottbb05c9002006-12-12 09:53:31 +000067
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000068 <target name="clean" description="Cleans this project's intermediate and output files">
69 <delete dir="${project.build}" />
70 <delete file="${project.lib}" />
71 </target>
gwt.team.scottbb05c9002006-12-12 09:53:31 +000072
73</project>