| <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}" /> |
| |
| <patternset id="chmod.executables"> |
| <include name="*Creator*" /> |
| <include name="samples/*/*-shell" /> |
| <include name="samples/*/*-compile" /> |
| </patternset> |
| |
| <patternset id="chmod.not.executables"> |
| <exclude name="*Creator*" /> |
| <exclude name="samples/*/*-shell*" /> |
| <exclude name="samples/*/*-compile*" /> |
| </patternset> |
| |
| <!-- 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> |
| </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="755"> |
| <fileset dir="${project.staging}"> |
| <patternset refid="chmod.executables" /> |
| </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> |