gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 1 | <project name="dev-core" default="build" basedir="."> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 2 | <property name="gwt.root" location="../.." /> |
| 3 | <property name="project.tail" value="dev/core" /> |
| 4 | <import file="${gwt.root}/common.ant.xml" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 5 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 6 | <property name="alldeps.jar" location="${project.build}/alldeps.jar" /> |
gwt.team.scottb | c4700b8 | 2006-12-12 11:23:41 +0000 | [diff] [blame] | 7 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 8 | <fileset id="default.tests" dir="${javac.junit.out}"> |
| 9 | <include name="**/*Test.class" /> |
| 10 | </fileset> |
gwt.team.scottb | 8635704 | 2007-03-09 08:00:14 +0000 | [diff] [blame] | 11 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 12 | <target name="compile.tests" depends="build" description="Compiles the test code for this project"> |
| 13 | <mkdir dir="${javac.junit.out}" /> |
| 14 | <gwt.javac srcdir="test" destdir="${javac.junit.out}"> |
| 15 | <classpath> |
| 16 | <pathelement location="${javac.out}" /> |
| 17 | <pathelement location="${alldeps.jar}" /> |
| 18 | <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> |
| 19 | </classpath> |
| 20 | </gwt.javac> |
| 21 | </target> |
gwt.team.scottb | 8635704 | 2007-03-09 08:00:14 +0000 | [diff] [blame] | 22 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 23 | <target name="build.alldeps.jar" description="Merges all dependency jars into a single jar"> |
| 24 | <mkdir dir="${project.build}" /> |
| 25 | <gwt.jar destfile="${alldeps.jar}"> |
| 26 | <zipfileset src="${gwt.tools.lib}/apache/tapestry-util-text-4.0.2.jar" /> |
| 27 | <zipfileset src="${gwt.tools.lib}/apache/ant-1.6.5.jar" /> |
jat@google.com | e7f61a7 | 2008-12-24 00:45:21 +0000 | [diff] [blame] | 28 | <zipfileset src="${gwt.tools.lib}/eclipse/jdt-3.4.2.jar" /> |
scottb@google.com | 2e8ef32 | 2008-11-04 20:59:58 +0000 | [diff] [blame] | 29 | <zipfileset src="${gwt.tools.lib}/jetty/jetty-6.1.11.jar" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 30 | <zipfileset src="${gwt.tools.lib}/tomcat/ant-launcher-1.6.5.jar" /> |
| 31 | <zipfileset src="${gwt.tools.lib}/tomcat/catalina-1.0.jar" /> |
| 32 | <zipfileset src="${gwt.tools.lib}/tomcat/catalina-optional-1.0.jar" /> |
| 33 | <zipfileset src="${gwt.tools.lib}/tomcat/commons-beanutils-1.6.jar" /> |
| 34 | <zipfileset src="${gwt.tools.lib}/tomcat/commons-collections-3.1.jar" /> |
| 35 | <zipfileset src="${gwt.tools.lib}/tomcat/commons-digester-1.5.jar" /> |
| 36 | <zipfileset src="${gwt.tools.lib}/tomcat/commons-el-1.0.jar" /> |
| 37 | <zipfileset src="${gwt.tools.lib}/tomcat/commons-logging-1.0.jar" /> |
| 38 | <zipfileset src="${gwt.tools.lib}/tomcat/commons-modeler-1.1.jar" /> |
| 39 | <zipfileset src="${gwt.tools.lib}/tomcat/jakarta-regexp-1.3.jar" /> |
| 40 | <zipfileset src="${gwt.tools.lib}/tomcat/jasper-compiler-1.0.jar" /> |
| 41 | <zipfileset src="${gwt.tools.lib}/tomcat/jasper-runtime-1.0.jar" /> |
| 42 | <zipfileset src="${gwt.tools.lib}/tomcat/jsp-api-2.0.jar" /> |
| 43 | <zipfileset src="${gwt.tools.lib}/tomcat/mx4j-jmx-1.1.jar" /> |
| 44 | <zipfileset src="${gwt.tools.lib}/tomcat/naming-common-1.0.jar" /> |
| 45 | <zipfileset src="${gwt.tools.lib}/tomcat/naming-factory-1.0.jar" /> |
| 46 | <zipfileset src="${gwt.tools.lib}/tomcat/naming-java-1.0.jar" /> |
| 47 | <zipfileset src="${gwt.tools.lib}/tomcat/naming-resources-1.0.jar" /> |
scottb@google.com | 4f57bc2 | 2009-01-16 22:46:42 +0000 | [diff] [blame] | 48 | <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 49 | <zipfileset src="${gwt.tools.lib}/tomcat/servlet-api-2.4.jar" /> |
| 50 | <zipfileset src="${gwt.tools.lib}/tomcat/servlets-common-1.0.jar" /> |
| 51 | <zipfileset src="${gwt.tools.lib}/tomcat/servlets-default-1.0.jar" /> |
| 52 | <zipfileset src="${gwt.tools.lib}/tomcat/servlets-invoker-1.0.jar" /> |
| 53 | <zipfileset src="${gwt.tools.lib}/tomcat/tomcat-coyote-1.0.jar" /> |
| 54 | <zipfileset src="${gwt.tools.lib}/tomcat/tomcat-http11-1.0.jar" /> |
| 55 | <zipfileset src="${gwt.tools.lib}/tomcat/tomcat-jk2-2.1.jar" /> |
| 56 | <zipfileset src="${gwt.tools.lib}/tomcat/tomcat-util-5.1.jar" /> |
| 57 | </gwt.jar> |
| 58 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 59 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 60 | <property name="filter.pattern" value="com/google/gwt/dev/About.properties" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 61 | |
fabbott@google.com | 3b1edcc | 2008-09-11 03:19:19 +0000 | [diff] [blame] | 62 | <target name="-filter.props" description="Creates filtered About.properties with version info" |
| 63 | unless="filter.uptodate"> |
| 64 | <gwt.revfilter todir="${javac.out}"> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 65 | <fileset dir="src" includes="${filter.pattern}" /> |
| 66 | </gwt.revfilter> |
fabbott@google.com | 3b1edcc | 2008-09-11 03:19:19 +0000 | [diff] [blame] | 67 | <touch file="${filter.sentinel}" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 68 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 69 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 70 | <target name="build" depends="build.alldeps.jar" description="Compiles this project"> |
| 71 | <!-- |
| 72 | There are classes missing from dev/core that are necessary |
| 73 | to compile the rest of dev/core (e.g. BootStrapPlatform); these are |
| 74 | provided by each platform implementation, but in order to compile the |
| 75 | core standalone, we need a dummy version of the class to build against. |
| 76 | --> |
| 77 | <property name="javac.out-dummy" location="${project.build}/bin-dummy" /> |
| 78 | <mkdir dir="${javac.out-dummy}" /> |
| 79 | <gwt.javac srcdir="src-dummy" destdir="${javac.out-dummy}" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 80 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 81 | <mkdir dir="${javac.out}" /> |
| 82 | <gwt.javac srcdir="super" excludes="com/google/gwt/dev/jjs/intrinsic/"/> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 83 | <gwt.javac srcdir="src" excludes="${filter.pattern}"> |
| 84 | <classpath> |
| 85 | <pathelement location="${javac.out-dummy}" /> |
| 86 | <pathelement location="${alldeps.jar}" /> |
| 87 | <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> |
| 88 | <!-- Must build against a version of SWT; just pick one --> |
| 89 | <pathelement location="${gwt.tools.lib}/eclipse/org.eclipse.swt.gtk-linux-3.2.1.jar" /> |
| 90 | </classpath> |
| 91 | </gwt.javac> |
| 92 | <copy todir="${javac.out}"> |
fabbott@google.com | 3b1edcc | 2008-09-11 03:19:19 +0000 | [diff] [blame] | 93 | <fileset dir="src" includes="**/*.properties" excludes="${filter.pattern}"/> |
| 94 | </copy> |
| 95 | |
| 96 | <!-- Files with hardcoded version information must be filtered --> |
| 97 | <gwt.getsvninfo /> |
| 98 | <condition property="filter.uptodate"> |
| 99 | <and> |
| 100 | <available file="${filter.sentinel}" /> |
| 101 | <uptodate> |
| 102 | <srcfiles dir="src" includes="${filter.pattern}" /> |
| 103 | <globmapper from="*" to="${javac.out}/*" /> |
| 104 | </uptodate> |
| 105 | </and> |
| 106 | </condition> |
| 107 | <antcall target="-filter.props" /> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 108 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 109 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 110 | <target name="checkstyle" description="Static analysis of source"> |
| 111 | <gwt.checkstyle> |
| 112 | <fileset dir="src"> |
| 113 | <filename name="com/google/gwt/dev/asm/**/*.java" negate="yes" /> |
| 114 | <filename name="com/google/gwt/dev/js/rhino/**/*.java" negate="yes" /> |
| 115 | <filename name="org/eclipse/**/*.java" negate="yes" /> |
| 116 | <filename name="org/apache/**/*.java" negate="yes" /> |
| 117 | </fileset> |
| 118 | </gwt.checkstyle> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 119 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 120 | <gwt.checkstyle> |
| 121 | <fileset dir="super/com/google/gwt/dev/jjs/intrinsic" /> |
| 122 | </gwt.checkstyle> |
| 123 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 124 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 125 | <target name="test" depends="build, compile.tests" description="Run unit tests for this project."> |
| 126 | <!-- TODO: refactor gwt.junit so it can be reused here --> |
| 127 | <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"> |
| 128 | <classpath> |
| 129 | <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> |
| 130 | <pathelement location="${gwt.tools.antlib}/ant-junit-1.6.5.jar" /> |
| 131 | </classpath> |
| 132 | </taskdef> |
| 133 | |
| 134 | <echo message="Writing test results to ${junit.out}/reports for ${test.cases}" /> |
| 135 | <mkdir dir="${junit.out}/reports" /> |
| 136 | |
| 137 | <echo message="${javac.out} ${javac.junit.out}" /> |
| 138 | <junit dir="${junit.out}" fork="yes" printsummary="yes" haltonfailure="true"> |
| 139 | <classpath> |
| 140 | <pathelement location="test" /> |
| 141 | <pathelement location="${javac.junit.out}" /> |
| 142 | <pathelement location="${javac.out}" /> |
| 143 | <pathelement location="${alldeps.jar}" /> |
| 144 | <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> |
| 145 | <!-- Pull in gwt-dev and gwt-user sources for .gwt.xml files --> |
| 146 | <pathelement location="${gwt.root}/user/src/" /> |
| 147 | <pathelement location="${gwt.root}/user/super/" /> |
| 148 | <pathelement location="${gwt.root}/dev/core/super" /> |
| 149 | </classpath> |
| 150 | |
| 151 | <formatter type="plain" /> |
| 152 | <formatter type="xml" /> |
| 153 | |
| 154 | <batchtest todir="${junit.out}/reports"> |
| 155 | <fileset refid="default.tests" /> |
| 156 | </batchtest> |
| 157 | </junit> |
| 158 | </target> |
gwt.team.scottb | 8635704 | 2007-03-09 08:00:14 +0000 | [diff] [blame] | 159 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 160 | <target name="clean" description="Cleans this project's intermediate and output files"> |
| 161 | <delete dir="${project.build}" /> |
| 162 | <delete file="${project.lib}" /> |
| 163 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 164 | </project> |