gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 1 | <project name="dist" default="build" basedir="."> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 2 | <property name="gwt.root" location=".." /> |
| 3 | <property name="project.tail" value="distro-source" /> |
| 4 | <import file="${gwt.root}/platforms.ant.xml" /> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 5 | |
jat@google.com | 0b1619e | 2009-09-20 19:33:31 +0000 | [diff] [blame] | 6 | <import file="common.ant.xml" /> |
| 7 | |
| 8 | <property name="project.dist" location="${gwt.build.dist}/${project.distname}.zip" /> |
| 9 | |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 10 | <target name="clean" description="Cleans this project's intermediate and output files"> |
| 11 | <delete dir="${gwt.build.dist}" failonerror="false" /> |
| 12 | <delete dir="${gwt.build.staging}" failonerror="false" /> |
jat@google.com | 0b1619e | 2009-09-20 19:33:31 +0000 | [diff] [blame] | 13 | <delete file="${project.dist}" failonerror="false" /> |
| 14 | </target> |
| 15 | |
| 16 | <target name="build" depends="filter" description="Packages the distro"> |
| 17 | <!-- TODO: figure out how to share most of this across platforms --> |
| 18 | <mkdir dir="${gwt.build.dist}" /> |
| 19 | <mkdir dir="${gwt.build.out}/samples-scripts"/> |
| 20 | <zip destfile="${project.dist}"> |
| 21 | <!-- jars --> |
| 22 | <zipfileset file="${gwt.build.lib}/gwt-dev.jar" prefix="${project.distname}" /> |
| 23 | <zipfileset file="${gwt.build.lib}/gwt-user.jar" prefix="${project.distname}" /> |
| 24 | <zipfileset file="${gwt.build.lib}/gwt-servlet.jar" prefix="${project.distname}" /> |
| 25 | <zipfileset file="${gwt.build.lib}/gwt-benchmark-viewer.war" prefix="${project.distname}" /> |
| 26 | <zipfileset file="${gwt.build.lib}/gwt-soyc-vis.jar" prefix="${project.distname}" /> |
| 27 | <zipfileset file="${gwt.build.lib}/gwt-api-checker.jar" prefix="${project.distname}" /> |
| 28 | |
jat@google.com | 64a55cb | 2009-10-16 14:16:57 +0000 | [diff] [blame] | 29 | <!-- jni libs--> |
| 30 | <zipfileset dir="${gwt.build.jni}/windows" prefix="${project.distname}" /> |
| 31 | |
jat@google.com | 0b1619e | 2009-09-20 19:33:31 +0000 | [diff] [blame] | 32 | <!-- raw files --> |
| 33 | <zipfileset dir="${dist.resources}" prefix="${project.distname}" /> |
fabbott@google.com | 008f27f | 2009-10-30 19:00:05 +0000 | [diff] [blame] | 34 | <zipfileset filemode="755" dir="src" prefix="${project.distname}" /> |
jat@google.com | 0b1619e | 2009-09-20 19:33:31 +0000 | [diff] [blame] | 35 | |
| 36 | <!-- doc --> |
| 37 | <zipfileset dir="${gwt.build.out}" prefix="${project.distname}"> |
| 38 | <include name="doc" /> |
| 39 | <include name="doc/html/**" /> |
| 40 | <include name="doc/css/**" /> |
| 41 | <include name="doc/javadoc/**" /> |
| 42 | </zipfileset> |
| 43 | |
| 44 | <!-- samples --> |
| 45 | <zipfileset dir="${gwt.build.out}" prefix="${project.distname}"> |
| 46 | <include name="samples" /> |
| 47 | <include name="samples/*" /> |
fabbott@google.com | 6bdc0f1 | 2010-08-25 18:12:04 +0000 | [diff] [blame] | 48 | <include name="samples/*/build.xml" /> |
| 49 | <include name="samples/*/pom.xml" /> |
| 50 | <include name="samples/*/README-MAVEN.txt" /> |
jat@google.com | 0b1619e | 2009-09-20 19:33:31 +0000 | [diff] [blame] | 51 | <include name="samples/*/src/**" /> |
| 52 | <include name="samples/*/war/**" /> |
| 53 | </zipfileset> |
| 54 | <zipfileset dir="${gwt.build.out}/samples-scripts" prefix="${project.distname}/samples"> |
| 55 | <include name="*/*" /> |
| 56 | </zipfileset> |
| 57 | </zip> |
| 58 | |
| 59 | <!-- |
| 60 | Unzip distro into the staging directory. |
| 61 | --> |
| 62 | <mkdir dir="${gwt.build.staging}" /> |
| 63 | <unzip src="${project.dist}" dest="${gwt.build.staging}" /> |
fabbott@google.com | 008f27f | 2009-10-30 19:00:05 +0000 | [diff] [blame] | 64 | <!-- cute. zipinfo says the zip has good perms, unzip gets it right, but |
| 65 | ant <unzip> leaves the perms as non-executable... go figure. --> |
| 66 | <chmod perm="uga+rx"> |
| 67 | <fileset dir="${gwt.build.staging}/gwt-${gwt.version}"> |
| 68 | <patternset refid="chmod.executables"/> |
| 69 | </fileset> |
| 70 | </chmod> |
fabbott@google.com | 0e2dc628 | 2008-08-22 16:09:01 +0000 | [diff] [blame] | 71 | </target> |
gwt.team.scottb | 14c5b9d | 2006-12-10 06:06:08 +0000 | [diff] [blame] | 72 | </project> |