blob: 5f344c98c14fb5f3b4d14ba56063b6452b8304d1 [file] [log] [blame]
gwt.team.scottb14c5b9d2006-12-10 06:06:08 +00001<project name="dist-common">
2 <property name="gwt.root" location="../.." />
3 <property name="project.tail" value="distro-source/${dist.platform}" />
4 <import file="${gwt.root}/common.ant.xml" />
5
6 <property name="project.distname" value="gwt-${dist.platform}-${gwt.version}" />
7 <property name="project.staging" location="${gwt.build.staging}/${project.distname}" />
8
9 <!-- copies a single sample into the staging directory -->
10 <macrodef name="stage.sample">
11 <attribute name="lname" />
12 <attribute name="uname" />
13 <sequential>
14 <mkdir dir="${project.staging}/samples/@{uname}" />
15 <copy todir="${project.staging}/samples/@{uname}">
16 <fileset dir="${gwt.root}/samples/@{lname}">
17 <include name="src/**" />
18 </fileset>
19 <fileset dir="${gwt.build.out}/samples/@{lname}">
20 <include name="bin/**" />
21 <include name="www/**" />
22 </fileset>
23 <fileset dir="${gwt.build.out}/samples/@{lname}/scripts/${dist.platform}">
24 <include name="*" />
25 </fileset>
26 </copy>
27 <chmod perm="a+x">
28 <fileset dir="${project.staging}/samples/@{uname}">
29 <include name="@{uname}-compile*" />
30 <include name="@{uname}-shell*" />
31 </fileset>
32 </chmod>
33 </sequential>
34 </macrodef>
35
36 <target name="stage" description="Copies items into the staging area">
37 <mkdir dir="${project.staging}" />
38
39 <copy todir="${project.staging}">
40 <fileset file="${gwt.build.lib}/gwt-dev-${dist.platform}.jar" />
41 <fileset file="${gwt.build.lib}/gwt-user.jar" />
42 <fileset file="${gwt.build.lib}/gwt-servlet.jar" />
43 <fileset dir="${gwt.build.jni}/${dist.platform}" />
44 <fileset dir="src" />
45 </copy>
46
47 <mkdir dir="${project.staging}/doc" />
48 <copy todir="${project.staging}/doc">
49 <fileset dir="${gwt.build.out}/doc">
50 <include name="html/**" />
51 <include name="css/**" />
52 <include name="javadoc/**" />
53 </fileset>
54 </copy>
55
56 <copy todir="${project.staging}">
57 <fileset dir="../core/src" />
58 <filterset>
59 <filter token="GWT_VERSION" value="${gwt.version}" />
60 </filterset>
61 </copy>
62
63 <stage.sample lname="dynatable" uname="DynaTable" />
64 <stage.sample lname="hello" uname="Hello" />
65 <stage.sample lname="i18n" uname="I18N" />
66 <stage.sample lname="json" uname="JSON" />
67 <stage.sample lname="kitchensink" uname="KitchenSink" />
68 <stage.sample lname="mail" uname="Mail" />
69 <stage.sample lname="simplexml" uname="SimpleXML" />
70
71 <antcall target="stage.platform" />
72 <chmod perm="a+r">
73 <dirset dir="${project.staging}" />
74 <fileset dir="${project.staging}" />
75 </chmod>
76 <chmod perm="a+x">
77 <dirset dir="${project.staging}" />
78 <fileset dir="${project.staging}">
79 <include name="*Creator*" />
80 </fileset>
81 </chmod>
82 </target>
83
84 <target name="clean" description="Cleans this project's intermediate and output files">
85 <delete dir="${project.staging}" failonerror="false" />
86 <delete file="${project.dist}" failonerror="false" />
87 </target>
88</project>