Ant fixes for platform independence, for dist-dev not needing tools, and 
for FD release in LatestTimeJar.

Review by: bobv


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5563 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/LatestTimeJar.java b/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/LatestTimeJar.java
index 7cf7352..01fe650 100644
--- a/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/LatestTimeJar.java
+++ b/build-tools/ant-gwt/src/com/google/gwt/ant/taskdefs/LatestTimeJar.java
@@ -116,8 +116,12 @@
     @Override
     public void addToZip(ZipOutputStream out, String path) throws IOException {
       FileInputStream inStream = new FileInputStream(tmpFile);
-      doZipFile(inStream, out, path, timestamp, archive, mode);
-      tmpFile.delete();
+      try {
+        doZipFile(inStream, out, path, timestamp, archive, mode);
+        tmpFile.delete();
+      } finally {
+        inStream.close();
+      }
     }
   }
 
diff --git a/build.xml b/build.xml
index 86f3c83..a0e7e20 100755
--- a/build.xml
+++ b/build.xml
@@ -35,7 +35,7 @@
     <gwt.ant dir="distro-source" target="${build.host.platform}" />
   </target>
 
-  <target name="dist-dev" depends="buildonly, tools" description="Make this platform's distribution, minus doc and samples">
+  <target name="dist-dev" depends="buildonly" description="Make this platform's distribution, minus doc and samples">
     <gwt.ant dir="distro-source" target="${build.host.platform}" />
   </target>
 
@@ -93,7 +93,7 @@
     <call-subproject subproject="samples" subtarget="checkstyle" />
   </target>
 
-  <target name="test" depends="dist-one" description="Runs all the GWT tests">
+  <target name="test" depends="dist-dev" description="Runs all the GWT tests">
     <call-subproject subproject="buildtools" subtarget="test" />
     <call-subproject subproject="dev" subtarget="test" />
     <call-subproject subproject="user" subtarget="test" />
diff --git a/samples/common.ant.xml b/samples/common.ant.xml
index 29bd661..784fdab 100755
--- a/samples/common.ant.xml
+++ b/samples/common.ant.xml
@@ -16,7 +16,7 @@
 
   <property.ensure name="gwt.user.jar" location="${gwt.build.lib}/gwt-user.jar" />
   <!-- Platform shouldn't matter here, just picking one -->
-  <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev-linux.jar" />
+  <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev-${build.host.platform}.jar" />
 
   <!-- Mirror directory for scripts; makes building distro easier -->
   <property name="samples.scripts" value="${gwt.build.out}/samples-scripts" />
diff --git a/tools/api-checker/build.xml b/tools/api-checker/build.xml
index 80e4303..5ee734f 100755
--- a/tools/api-checker/build.xml
+++ b/tools/api-checker/build.xml
@@ -7,7 +7,7 @@
         <property name="tools.build" value="${gwt.build.out}/${project.tail}" />
 
   <!-- Platform shouldn't matter here, just picking one -->
-  <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev-linux.jar" />
+  <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev-${build.host.platform}.jar" />
   <property.ensure name="gwt.user.jar" location="${gwt.build.lib}/gwt-user.jar" />
 
   <target name="compile" description="Compile all class files">
diff --git a/tools/soyc-vis/build.xml b/tools/soyc-vis/build.xml
index 6650e54..523c8b2 100644
--- a/tools/soyc-vis/build.xml
+++ b/tools/soyc-vis/build.xml
@@ -7,7 +7,7 @@
   <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-linux.jar" />
+  <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev-${build.host.platform}.jar" />
 
   <target name="clean">
     <delete dir="build"/>
@@ -41,4 +41,4 @@
 
   <target name="checkstyle"/>
 
-</project>
\ No newline at end of file
+</project>