| <project name="elemental" default="build" basedir="."> |
| <property name="gwt.root" location=".." /> |
| <property name="project.tail" value="elemental" /> |
| <property name="test.args" value="-ea" /> |
| <property name="test.jvmargs" value="-ea" /> |
| |
| <import file="${gwt.root}/common.ant.xml" /> |
| |
| <!-- Platform shouldn't matter here, just picking one --> |
| <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" /> |
| <property.ensure name="gwt.user.jar" location="${gwt.build.lib}/gwt-user.jar" /> |
| |
| <target name="generate" description="Generate Elemental bindings from IDL"> |
| <exec executable="idl/build" dir="." failonerror="true"/> |
| </target> |
| |
| <target name="compile" description="Compile all class files"> |
| <mkdir dir="${javac.out}" /> |
| <gwt.javac srcdir="src:idl/generated/src" excludes="**/super/**"> |
| <classpath> |
| <pathelement location="${gwt.dev.jar}" /> |
| <pathelement location="${gwt.user.jar}" /> |
| </classpath> |
| </gwt.javac> |
| </target> |
| |
| <target name="build" depends="generate, compile" |
| description="Creates gwt-elemental.jar"> |
| <mkdir dir="${gwt.build.lib}" /> |
| <gwt.jar> |
| <fileset dir="src" excludes="**/package.html" /> |
| <fileset dir="idl/generated/src"/> |
| <fileset dir="${javac.out}" /> |
| </gwt.jar> |
| </target> |
| |
| <macrodef name="compileModule"> |
| <element name="module" /> |
| <sequential> |
| <gwt.timer name="Pre-compile module"> |
| <java classname="com.google.gwt.dev.CompileModule" fork="yes" failonerror="true"> |
| <classpath> |
| <pathelement location="${gwt.root}/elemental/src" /> |
| <pathelement location="${gwt.root}/elemental/idl/generated/src" /> |
| <pathelement location="${gwt.dev.jar}" /> |
| <pathelement location="${gwt.user.jar}" /> |
| </classpath> |
| <jvmarg value="-Xmx512M" /> |
| <module /> |
| <arg value="-strict" /> |
| <arg value="-sourceLevel" /> |
| <arg value="${javac.source}" /> |
| <arg value="-out" /> |
| <arg value="${project.build}/bin" /> |
| </java> |
| </gwt.timer> |
| </sequential> |
| </macrodef> |
| |
| <target name="clean" |
| description="Cleans this project's intermediate and output files"> |
| <delete dir="idl/generated" /> |
| <delete dir="idl/database" /> |
| <delete dir="${project.build}" /> |
| <delete file="${project.lib}" /> |
| </target> |
| </project> |