spoon@google.com | ffc9e23 | 2008-04-21 18:33:15 +0000 | [diff] [blame] | 1 | <project name="api-checker" default="build" basedir="."> |
| 2 | |
jlabanca@google.com | 8124456 | 2009-08-05 19:55:36 +0000 | [diff] [blame] | 3 | <property name="gwt.root" location="../.." /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 4 | <property name="project.tail" value="tools/api-checker" /> |
| 5 | <import file="${gwt.root}/common.ant.xml" /> |
spoon@google.com | ffc9e23 | 2008-04-21 18:33:15 +0000 | [diff] [blame] | 6 | |
jlabanca@google.com | 8124456 | 2009-08-05 19:55:36 +0000 | [diff] [blame] | 7 | <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.com | ffc9e23 | 2008-04-21 18:33:15 +0000 | [diff] [blame] | 10 | |
jat@google.com | 0b1619e | 2009-09-20 19:33:31 +0000 | [diff] [blame] | 11 | <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 12 | <property.ensure name="gwt.user.jar" location="${gwt.build.lib}/gwt-user.jar" /> |
spoon@google.com | ffc9e23 | 2008-04-21 18:33:15 +0000 | [diff] [blame] | 13 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 14 | <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.com | ffc9e23 | 2008-04-21 18:33:15 +0000 | [diff] [blame] | 23 | |
scottb@google.com | a0ae7eb | 2009-11-10 03:37:01 +0000 | [diff] [blame] | 24 | <!-- |
| 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.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 34 | <mkdir dir="${javac.junit.out}" /> |
| 35 | <gwt.javac srcdir="test" destdir="${javac.junit.out}"> |
| 36 | <classpath> |
| 37 | <pathelement location="${javac.out}" /> |
fabbott@google.com | 618aafc | 2011-03-08 16:22:05 +0000 | [diff] [blame] | 38 | <pathelement location="${gwt.tools.lib}/junit/junit-4.8.2.jar" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 39 | <pathelement location="${gwt.dev.staging.jar}" /> |
| 40 | <pathelement location="${gwt.dev.jar}" /> |
scottb@google.com | a0ae7eb | 2009-11-10 03:37:01 +0000 | [diff] [blame] | 41 | <pathelement location="${gwt.build.out}/dev/bin-test" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 42 | <pathelement location="${gwt.user.jar}" /> |
| 43 | </classpath> |
| 44 | </gwt.javac> |
| 45 | </target> |
spoon@google.com | ffc9e23 | 2008-04-21 18:33:15 +0000 | [diff] [blame] | 46 | |
scottb@google.com | a0ae7eb | 2009-11-10 03:37:01 +0000 | [diff] [blame] | 47 | <target name="build" depends="compile" description="Build and package this project"> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 48 | <mkdir dir="${gwt.build.lib}" /> |
spoon@google.com | ffc9e23 | 2008-04-21 18:33:15 +0000 | [diff] [blame] | 49 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 50 | <gwt.jar> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 51 | <fileset dir="${javac.out}" /> |
| 52 | </gwt.jar> |
| 53 | </target> |
spoon@google.com | ffc9e23 | 2008-04-21 18:33:15 +0000 | [diff] [blame] | 54 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 55 | <target name="test" depends="build, compile.tests" description="Run unit tests for this project."> |
jlabanca@google.com | 8124456 | 2009-08-05 19:55:36 +0000 | [diff] [blame] | 56 | <fileset id="tests.apichecker" dir="${javac.junit.out}" includes="${gwt.junit.testcase.apichecker.includes}" excludes="${gwt.junit.testcase.apichecker.excludes}" /> |
jlabanca@google.com | 2707b14 | 2009-11-04 17:47:36 +0000 | [diff] [blame] | 57 | <gwt.junit test.name="api-checker" test.out="${junit.out}" |
| 58 | test.cases="tests.apichecker" > |
jlabanca@google.com | 8124456 | 2009-08-05 19:55:36 +0000 | [diff] [blame] | 59 | <extraclasspaths> |
scottb@google.com | f3c01eb | 2009-04-02 22:12:54 +0000 | [diff] [blame] | 60 | <pathelement location="${gwt.build.out}/tools/api-checker/bin"/> |
| 61 | <pathelement location="${gwt.dev.jar}" /> |
scottb@google.com | a0ae7eb | 2009-11-10 03:37:01 +0000 | [diff] [blame] | 62 | <pathelement location="${gwt.build.out}/dev/bin-test" /> |
jlabanca@google.com | 8124456 | 2009-08-05 19:55:36 +0000 | [diff] [blame] | 63 | </extraclasspaths> |
| 64 | </gwt.junit> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 65 | </target> |
spoon@google.com | ffc9e23 | 2008-04-21 18:33:15 +0000 | [diff] [blame] | 66 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 67 | <target name="checkstyle" description="Static analysis of source"> |
| 68 | <gwt.checkstyle> |
| 69 | <fileset dir="src"/> |
| 70 | </gwt.checkstyle> |
| 71 | </target> |
spoon@google.com | ffc9e23 | 2008-04-21 18:33:15 +0000 | [diff] [blame] | 72 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 73 | <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.com | ffc9e23 | 2008-04-21 18:33:15 +0000 | [diff] [blame] | 77 | </project> |
| 78 | |