blob: 5f344c98c14fb5f3b4d14ba56063b6452b8304d1 [file] [log] [blame]
<project name="dist-common">
<property name="gwt.root" location="../.." />
<property name="project.tail" value="distro-source/${dist.platform}" />
<import file="${gwt.root}/common.ant.xml" />
<property name="project.distname" value="gwt-${dist.platform}-${gwt.version}" />
<property name="project.staging" location="${gwt.build.staging}/${project.distname}" />
<!-- copies a single sample into the staging directory -->
<macrodef name="stage.sample">
<attribute name="lname" />
<attribute name="uname" />
<sequential>
<mkdir dir="${project.staging}/samples/@{uname}" />
<copy todir="${project.staging}/samples/@{uname}">
<fileset dir="${gwt.root}/samples/@{lname}">
<include name="src/**" />
</fileset>
<fileset dir="${gwt.build.out}/samples/@{lname}">
<include name="bin/**" />
<include name="www/**" />
</fileset>
<fileset dir="${gwt.build.out}/samples/@{lname}/scripts/${dist.platform}">
<include name="*" />
</fileset>
</copy>
<chmod perm="a+x">
<fileset dir="${project.staging}/samples/@{uname}">
<include name="@{uname}-compile*" />
<include name="@{uname}-shell*" />
</fileset>
</chmod>
</sequential>
</macrodef>
<target name="stage" description="Copies items into the staging area">
<mkdir dir="${project.staging}" />
<copy todir="${project.staging}">
<fileset file="${gwt.build.lib}/gwt-dev-${dist.platform}.jar" />
<fileset file="${gwt.build.lib}/gwt-user.jar" />
<fileset file="${gwt.build.lib}/gwt-servlet.jar" />
<fileset dir="${gwt.build.jni}/${dist.platform}" />
<fileset dir="src" />
</copy>
<mkdir dir="${project.staging}/doc" />
<copy todir="${project.staging}/doc">
<fileset dir="${gwt.build.out}/doc">
<include name="html/**" />
<include name="css/**" />
<include name="javadoc/**" />
</fileset>
</copy>
<copy todir="${project.staging}">
<fileset dir="../core/src" />
<filterset>
<filter token="GWT_VERSION" value="${gwt.version}" />
</filterset>
</copy>
<stage.sample lname="dynatable" uname="DynaTable" />
<stage.sample lname="hello" uname="Hello" />
<stage.sample lname="i18n" uname="I18N" />
<stage.sample lname="json" uname="JSON" />
<stage.sample lname="kitchensink" uname="KitchenSink" />
<stage.sample lname="mail" uname="Mail" />
<stage.sample lname="simplexml" uname="SimpleXML" />
<antcall target="stage.platform" />
<chmod perm="a+r">
<dirset dir="${project.staging}" />
<fileset dir="${project.staging}" />
</chmod>
<chmod perm="a+x">
<dirset dir="${project.staging}" />
<fileset dir="${project.staging}">
<include name="*Creator*" />
</fileset>
</chmod>
</target>
<target name="clean" description="Cleans this project's intermediate and output files">
<delete dir="${project.staging}" failonerror="false" />
<delete file="${project.dist}" failonerror="false" />
</target>
</project>