blob: 5eb8c35e8ba1cfb6c0922b21792f087395dbf424 [file] [log] [blame]
spoon@google.comffc9e232008-04-21 18:33:15 +00001<project name="api-checker" default="build" basedir=".">
2
jlabanca@google.com81244562009-08-05 19:55:36 +00003 <property name="gwt.root" location="../.." />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +00004 <property name="project.tail" value="tools/api-checker" />
5 <import file="${gwt.root}/common.ant.xml" />
spoon@google.comffc9e232008-04-21 18:33:15 +00006
jlabanca@google.com81244562009-08-05 19:55:36 +00007 <property name="tools.build" value="${gwt.build.out}/${project.tail}" />
8 <property name="gwt.junit.testcase.apichecker.includes" value="**/*Test.class" />
9 <property name="gwt.junit.testcase.apichecker.excludes" value="" />
spoon@google.comffc9e232008-04-21 18:33:15 +000010
jat@google.com0b1619e2009-09-20 19:33:31 +000011 <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000012 <property.ensure name="gwt.user.jar" location="${gwt.build.lib}/gwt-user.jar" />
spoon@google.comffc9e232008-04-21 18:33:15 +000013
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000014 <target name="compile" description="Compile all class files">
15 <mkdir dir="${javac.out}" />
16 <gwt.javac>
17 <classpath>
18 <pathelement location="${gwt.dev.jar}" />
19 <pathelement location="${gwt.user.jar}" />
20 </classpath>
21 </gwt.javac>
22 </target>
spoon@google.comffc9e232008-04-21 18:33:15 +000023
scottb@google.coma0ae7eb2009-11-10 03:37:01 +000024 <!--
25 Compiles test dependencies in dev/core
26 -->
27 <target name="compile.dev.tests">
28 <gwt.ant dir="../../dev" target="compile.tests" />
29 </target>
30
31 <target name="compile.tests"
32 depends="compile.dev.tests, compile.emma.if.enabled"
33 description="Compiles the test code for this project">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000034 <mkdir dir="${javac.junit.out}" />
35 <gwt.javac srcdir="test" destdir="${javac.junit.out}">
36 <classpath>
37 <pathelement location="${javac.out}" />
38 <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
39 <pathelement location="${gwt.dev.staging.jar}" />
40 <pathelement location="${gwt.dev.jar}" />
scottb@google.coma0ae7eb2009-11-10 03:37:01 +000041 <pathelement location="${gwt.build.out}/dev/bin-test" />
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000042 <pathelement location="${gwt.user.jar}" />
43 </classpath>
44 </gwt.javac>
45 </target>
spoon@google.comffc9e232008-04-21 18:33:15 +000046
scottb@google.coma0ae7eb2009-11-10 03:37:01 +000047 <target name="build" depends="compile" description="Build and package this project">
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000048 <mkdir dir="${gwt.build.lib}" />
spoon@google.comffc9e232008-04-21 18:33:15 +000049
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000050 <gwt.jar>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000051 <fileset dir="${javac.out}" />
52 </gwt.jar>
53 </target>
spoon@google.comffc9e232008-04-21 18:33:15 +000054
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000055 <target name="test" depends="build, compile.tests" description="Run unit tests for this project.">
jlabanca@google.com81244562009-08-05 19:55:36 +000056 <fileset id="tests.apichecker" dir="${javac.junit.out}" includes="${gwt.junit.testcase.apichecker.includes}" excludes="${gwt.junit.testcase.apichecker.excludes}" />
jlabanca@google.com2707b142009-11-04 17:47:36 +000057 <gwt.junit test.name="api-checker" test.out="${junit.out}"
58 test.cases="tests.apichecker" >
jlabanca@google.com81244562009-08-05 19:55:36 +000059 <extraclasspaths>
scottb@google.comf3c01eb2009-04-02 22:12:54 +000060 <pathelement location="${gwt.build.out}/tools/api-checker/bin"/>
61 <pathelement location="${gwt.dev.jar}" />
scottb@google.coma0ae7eb2009-11-10 03:37:01 +000062 <pathelement location="${gwt.build.out}/dev/bin-test" />
jlabanca@google.com81244562009-08-05 19:55:36 +000063 </extraclasspaths>
64 </gwt.junit>
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000065 </target>
spoon@google.comffc9e232008-04-21 18:33:15 +000066
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000067 <target name="checkstyle" description="Static analysis of source">
68 <gwt.checkstyle>
69 <fileset dir="src"/>
70 </gwt.checkstyle>
71 </target>
spoon@google.comffc9e232008-04-21 18:33:15 +000072
fabbott@google.com0e2dc6282008-08-22 16:09:01 +000073 <target name="clean" description="Cleans this project's intermediate and output files">
74 <delete dir="${project.build}" />
75 <delete file="${project.lib}" />
76 </target>
spoon@google.comffc9e232008-04-21 18:33:15 +000077</project>
78