blob: 7277f67a3ea1f6f696752ee24fddcd8506872cdb [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}" />
<gwt.javac srcdir="" 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" />
<pathelement location="${gwt.tools.lib}/jsinterop/jsinterop-annotations-2.0.0.jar" />
</classpath>
</gwt.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}" />
<pathelement location="${gwt.tools.lib}/jsinterop/jsinterop-annotations-2.0.0.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>