blob: e40b48b8118a85a923339757b2a008179cfc2704 [file] [log] [blame]
<project name="codeserver" default="build" basedir=".">
<property name="gwt.root" location="../.." />
<property name="project.tail" value="dev/codeserver" />
<import file="${gwt.root}/common.ant.xml" />
<property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" />
<target name="compile">
<mkdir dir="${javac.out}" />
<gwt.javac srcdir="java">
<classpath>
<pathelement location="${gwt.dev.jar}" />
</classpath>
</gwt.javac>
</target>
<target name="compile.tests" depends="compile"
description="Compile tests java source">
<mkdir dir="${javac.junit.out}" />
<javac destdir="${javac.junit.out}">
<src path="java" />
<src path="javatests" />
<classpath>
<pathelement location="${gwt.root}/build/out/dev/bin-test"/>
<pathelement location="${javac.out}"/>
<pathelement location="${gwt.dev.jar}" />
<pathelement location="${gwt.tools.lib}/junit/junit-4.8.2.jar" />
</classpath>
</javac>
</target>
<target name="build" depends="compile" description="builds gwt-codeserver.jar">
<gwt.jar>
<fileset dir="${javac.out}"/>
<fileset dir="java">
<include name="**/*.java"/>
<include name="**/*.html"/>
<include name="**/*.ico"/>
<include name="**/*.js"/>
</fileset>
<manifest>
<!-- why doesn't this work?
<attribute name="Class-Path" value="gwt-dev.jar gwt.user.jar" />
-->
<attribute name="Main-Class" value="com.google.gwt.dev.codeserver.CodeServer" />
</manifest>
</gwt.jar>
</target>
<target name="test" depends="build, compile.tests"
unless="test.codeserver.disable"
description="Run tests">
<mkdir dir="${junit.out}/codeserver" />
<fileset id="tests" dir="${javac.junit.out}"
includes="**/*Test.class" />
<gwt.junit test.name="test"
test.args=""
test.jvmargs="-ea"
test.out="${junit.out}/codeserver"
test.cases="tests">
<extraclasspaths>
<pathelement location="${gwt.root}/build/out/dev/bin-test"/>
<pathelement location="${project.lib}"/>
<pathelement location="${gwt.dev.jar}" />
<!-- Pull in gwt-user sources -->
<pathelement location="${gwt.root}/user/src/"/>
<pathelement location="${gwt.root}/user/super/"/>
<pathelement location="java/" />
<pathelement location="javatests/" />
</extraclasspaths>
</gwt.junit>
</target>
<!-- no-op for now -->
<target name="verify"/>
<target name="demo" depends="build" description="starts the code server with a sample app">
<property.ensure name="gwt.user.jar" location="${gwt.build.lib}/gwt-user.jar" />
<property.ensure name="sample-src" location="${gwt.root}/samples/hello/src" />
<java fork="true" failonerror="true" classname="com.google.gwt.dev.codeserver.CodeServer">
<classpath>
<pathelement location="${project.lib}"/>
<pathelement location="${gwt.dev.jar}"/>
<pathelement location="${gwt.user.jar}"/>
</classpath>
<arg value="-src"/>
<arg value="${sample-src}"/>
<arg value="com.google.gwt.sample.hello.Hello"/>
</java>
</target>
</project>