blob: 40ea109f0887d2dcf3e0c8f69f7bd9d6302cd214 [file] [log] [blame]
<project name="requestfactory" default="build" basedir=".">
<property name="gwt.root" location=".." />
<property name="project.tail" value="requestfactory" />
<import file="${gwt.root}/common.ant.xml" />
<!-- Remove all output files -->
<target name="clean" description="Cleans this project's output files">
<delete file="${gwt.build.lib}/requestfactory-apt.jar" />
<delete file="${gwt.build.lib}/requestfactory-apt-src.jar" />
<delete file="${gwt.build.lib}/requestfactory-client.jar" />
<delete file="${gwt.build.lib}/requestfactory-client-src.jar" />
<delete file="${gwt.build.lib}/requestfactory-client+src.jar" />
<delete file="${gwt.build.lib}/requestfactory-server.jar" />
<delete file="${gwt.build.lib}/requestfactory-server-src.jar" />
<delete file="${gwt.build.lib}/requestfactory-server+src.jar" />
<delete file="${gwt.build.lib}/requestfactory-test.jar" />
<delete file="${gwt.build.lib}/requestfactory-test-src.jar" />
<delete file="${gwt.build.lib}/requestfactory-test-validated.jar" />
</target>
<!-- Build a jar file containing a subset of requestfactory -->
<macrodef name="requestfactory-jar">
<!--
"target" should be one of {client,server,all}[(+|-)src] or test[-src].
-src includes .java files only, +src includes .java and .class files
-->
<attribute name="target" default="client"/>
<sequential>
<java failonerror="true" fork="true"
classname="com.google.web.bindery.requestfactory.server.RequestFactoryJarExtractor">
<classpath>
<fileset dir="${gwt.build.lib}" includes="gwt-user.jar,gwt-dev.jar" />
<fileset dir="${gwt.tools.redist}" includes="json/r2_20080312/json-1.5.jar" />
<pathelement location="${gwt.tools.lib}/junit/junit-4.8.2.jar" />
<pathelement path="${gwt.build.out}/user/bin" />
<pathelement path="${gwt.build.out}/dev/bin-test" />
<pathelement path="${gwt.build.out}/user/bin-test" />
</classpath>
<jvmarg value="-ea"/>
<arg value="@{target}"/>
<arg file="${gwt.build.lib}/requestfactory-@{target}.jar"/>
</java>
</sequential>
</macrodef>
<!-- Targets for individual jars -->
<target name="requestfactory-apt" description="Build RequestFactory apt jar">
<requestfactory-jar target="apt"/>
</target>
<!-- Targets for individual jars -->
<target name="requestfactory-apt-src" description="Build RequestFactory apt source jar">
<requestfactory-jar target="apt-src"/>
</target>
<!-- Useful for Android testing -->
<target name="requestfactory-all" description="Build RequestFactory all jar">
<requestfactory-jar target="all"/>
</target>
<target name="requestfactory-client" description="Build RequestFactory client jar">
<requestfactory-jar target="client"/>
</target>
<target name="requestfactory-client-src" description="Build RequestFactory client source jar">
<requestfactory-jar target="client-src"/>
</target>
<target name="requestfactory-client+src" description="Build RequestFactory client source/class jar">
<requestfactory-jar target="client+src"/>
</target>
<target name="requestfactory-server" description="Build RequestFactory server jar">
<requestfactory-jar target="server"/>
</target>
<target name="requestfactory-server-src" description="Build RequestFactory server source jar">
<requestfactory-jar target="server-src"/>
</target>
<target name="requestfactory-server+src" description="Build RequestFactory server source/class jar">
<requestfactory-jar target="server+src"/>
</target>
<!-- This target requires classes from ../build/{dev,user}/bin-test -->
<target name="requestfactory-test" description="Build RequestFactory test source/class jar">
<requestfactory-jar target="test" />
<requestfactory-jar target="test-src" />
</target>
<!-- Build all client jars -->
<target name="clientjars" depends="requestfactory-apt,requestfactory-apt-src,requestfactory-client,requestfactory-client-src,requestfactory-client+src" description="Build requestfactory client jars" />
<!-- Build all server jars -->
<target name="serverjars" depends="requestfactory-server,requestfactory-server-src,requestfactory-server+src" description="Build requestfactory server jars" />
<!-- Default target, build client and server jars.
Assumes the 'user' target has been built in the trunk directory
-->
<target name="build" depends="clientjars,serverjars" />
<!-- Run RequestFactoryJreSuite from the requestfactory-test+src jar.
Assumes test classes have been built in the trunk directory
-->
<target name="test" depends="requestfactory-test" description="Run RequestFactoryJreSuite">
<!-- There's no direct dependency on the Deobfuscator builders, so this gives us an opportunity
to test the post-compilation ValidationTool to generate the metadata from the precompiled
class files. If a new RequestFactory types is added without the argument list below being
updated, a runtime error will occur giving the name of the RequestFactory that needs to
be validated.
-->
<java failonerror="true" fork="true"
classname="com.google.web.bindery.requestfactory.apt.ValidationTool" >
<classpath>
<fileset dir="${gwt.build.lib}" includes="requestfactory-apt.jar" />
<fileset dir="${gwt.build.lib}" includes="requestfactory-client.jar" />
<fileset dir="${gwt.build.lib}" includes="requestfactory-test.jar" />
</classpath>
<arg path="${gwt.build.lib}/requestfactory-test-validated.jar" />
<arg value="com.google.web.bindery.requestfactory.gwt.client.RequestFactoryChainedContextTest.Factory" />
<arg value="com.google.web.bindery.requestfactory.gwt.client.RequestFactoryPolymorphicTest.Factory" />
<arg value="com.google.web.bindery.requestfactory.shared.BoxesAndPrimitivesTest.Factory" />
<arg value="com.google.web.bindery.requestfactory.shared.ComplexKeysTest.Factory" />
<arg value="com.google.web.bindery.requestfactory.shared.LocatorTest.Factory" />
<arg value="com.google.web.bindery.requestfactory.shared.MultipleFactoriesTest.Factory1" />
<arg value="com.google.web.bindery.requestfactory.shared.MultipleFactoriesTest.Factory2" />
<arg value="com.google.web.bindery.requestfactory.shared.ServiceInheritanceTest$Factory" />
<arg value="com.google.web.bindery.requestfactory.shared.SimpleJsonRpcRequestFactory" />
<arg value="com.google.web.bindery.requestfactory.shared.SimpleRequestFactory" />
</java>
<java failonerror="true" fork="true"
classname="com.google.web.bindery.requestfactory.vm.RequestFactoryJreSuite">
<jvmarg value="-Xss8m" />
<classpath>
<fileset dir="${gwt.tools.lib}" includes="jetty/jetty-8.1.12.v20130726/servlet-api-3.0-NoMetaInf.jar" />
<fileset dir="${gwt.tools.lib}" includes="apache/log4j/log4j-1.2.16.jar" />
<fileset dir="${gwt.tools.lib}" includes="slf4j/slf4j-api/slf4j-api-1.6.1.jar" />
<fileset dir="${gwt.tools.lib}" includes="slf4j/slf4j-log4j12/slf4j-log4j12-1.6.1.jar" />
<fileset dir="${gwt.tools.lib}" includes="hibernate/validator/hibernate-validator-4.1.0.Final.jar" />
<fileset dir="${gwt.tools.lib}" includes="javax/validation/validation-api-1.0.0.GA.jar" />
<fileset dir="${gwt.tools.lib}" includes="javax/xml/bind/jaxb-api-2.1.jar" />
<fileset dir="${gwt.build.lib}" includes="requestfactory-test.jar" />
<fileset dir="${gwt.build.lib}" includes="requestfactory-test-src.jar" />
<fileset dir="${gwt.build.lib}" includes="requestfactory-test-validated.jar" />
</classpath>
</java>
</target>
</project>