<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -270,7 +270,16 @@ final performTests =  { classpathId -&gt;
       fileset ( dir : jarfilesDirectory , includes : mavenAntTaskJarName ) 
       path ( refid : classpathId )
     }
+    //
+    //  The Gant Ant task integration test (which is still a unit test :-( has to know the absolute
+    //  locations of certain files.  Because Gradle uses a multi-project build there is an extra level
+    //  complexity in paths compared to Eclipse, IntelliJ IDEA or Gant builds because the multi-project
+    //  builds happen in subdirectories.  org.codehaus.gant.ant.tests.Gant_Test has a decision to make, it
+    //  needs to know whether this is a Gradle build or not.  Use a property.  Obviously this being Gant, we
+    //  don't actually care, but set the property anyway in case.
+    //
     // Forkmode should be once for speed but perTest for safety.
+    //
     if ( ( testCase == null ) || ! ( testCase ==~ 'org.codehaus.gant.ant.tests.*_Test' ) ) {                        
       junit ( printsummary : 'yes' , failureproperty : 'testsFailed' , fork : 'true' , forkmode : 'once' , includeantruntime : 'false' ) {
         // jvmarg ( line : '-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005' )
@@ -285,6 +294,7 @@ final performTests =  { classpathId -&gt;
           path ( refid : testClasspathId )
           pathelement ( location : currentGantJarPath )
         }
+        sysproperty ( key : 'buildFrameworkIdentifier' , value : 'Gant' )
       }
     }
     if ( ( testCase == null ) || ( testCase ==~ 'org.codehaus.gant.ant.tests.*_Test' ) ) {                        
@@ -293,6 +303,7 @@ final performTests =  { classpathId -&gt;
         formatter ( type : 'xml' ) // Must have XML output for the continuous integration builds.
         batchtest ( todir : buildTestReportsDirectory ) { fileset ( dir : buildTestClassesDirectory , includes : '**/ant/tests/*_Test.class' ) }
         classpath { path ( refid : testClasspathId ) }
+        sysproperty ( key : 'buildFrameworkIdentifier' , value : 'Gant' )
       }
     }
     junitreport ( todir : buildTestReportsDirectory ) {</diff>
      <filename>build.gant</filename>
    </modified>
    <modified>
      <diff>@@ -93,7 +93,19 @@ subprojects {
     testRuntime ( 'org.apache.ivy:ivy:' + ivyVersion )
   }
   compileGroovy.options.compilerArgs = ['-Xlint']
-  test.doLast { groovyAntTaskTestVersionPropertyFile.delete ( ) }
+  test {
+    //
+    //  The Gant Ant task integration test (which is still a unit test :-( has to know the absolute
+    //  locations of certain files.  Because Gradle uses a multi-project build there is an extra level
+    //  complexity in paths compared to Eclipse, IntelliJ IDEA or Gant builds because the multi-project
+    //  builds happen in subdirectories.  org.codehaus.gant.ant.tests.Gant_Test has a decision to make, it
+    //  needs to know whether this is a Gradle build or not.  Use a property.
+    //
+    //  This seems like an ugly way of setting properties in the forked test JVM.
+    //
+    options.fork ( jvmArgs: [ &quot;-DbuildFrameworkIdentifier=Gradle&quot; ]  )
+    doLast { groovyAntTaskTestVersionPropertyFile.delete ( ) }
+  }
   clean.doLast {
     ant.delete { fileset ( dir : '.' , includes : '**/*~, texput.log' ) }
     ant.delete ( dir :  'target_forMavenTest' )
@@ -132,7 +144,7 @@ subprojects {
   task documentation ( dependsOn: [ 'javadoc' , 'groovydoc' ] , description : 'Create the API documentation.' )
   uploadArchives {
     repositories.mavenDeployer {
-      uniqueVersion = false
+      //uniqueVersion = false
       //configuration = configurations.deployerJars
       repository ( url : 'https://dav.codehaus.org/repository/gant' )
       snapshotRepository ( url : 'https://dav.codehaus.org/snapshots.repository/gant' )</diff>
      <filename>build.gradle</filename>
    </modified>
    <modified>
      <diff>@@ -40,7 +40,7 @@ public class Gant_Test extends TestCase {
   private final String endOfTargetMarker = &quot;------ &quot; ;
   private final String separator = System.getProperty ( &quot;file.separator&quot; ) ;
   private final boolean isWindows = System.getProperty ( &quot;os.name&quot; ).startsWith ( &quot;Windows&quot; ) ;
-  private final String locationPrefix = ( true ? &quot;..&quot; + separator : &quot;&quot; ) ;
+  private final String locationPrefix = ( &quot;Gradle&quot;.equals ( System.getProperty ( &quot;buildFrameworkIdentifier&quot; ) ) ? &quot;..&quot; + separator : &quot;&quot; ) ;
   private final String path ; {
     final StringBuilder sb = new StringBuilder ( ) ;
     sb.append ( &quot;src&quot; ) ;
@@ -65,10 +65,8 @@ public class Gant_Test extends TestCase {
     try { absolutePath =  ( new File ( locationPrefix + path ) ).getCanonicalPath ( ) ; }
     catch ( final IOException ioe ) { throw new RuntimeException ( &quot;Canonical path calculation failure.&quot; , ioe ) ; }
     antFile =  new File ( absolutePath , &quot;gantTest.xml&quot; ) ;
-  }  
-
+  }
   private Project project ;
-
   //  This variable is assigned in the Gant script hence the public static.
   public static String returnValue ;
 
@@ -287,6 +285,7 @@ public class Gant_Test extends TestCase {
     //  TODO : Should this be sb.append ( absolutePath ) ?  cf. GANT-50.
     //
     sb.append ( System.getProperty ( &quot;user.dir&quot; ) ) ;
+    //sb.append ( absolutePath ) ;
     sb.append ( &quot;\n   [groovy] &quot; + endOfTargetMarker + &quot;default\n   [groovy] \n\nBUILD SUCCESSFUL\n\n&quot; ) ;
     final List&lt;String&gt; result = runAnt ( basedirAntFilePath , target , 0 , true ) ;
     assert result.size ( ) == 2 ;</diff>
      <filename>src/test/groovy/org/codehaus/gant/ant/tests/Gant_Test.java</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e834c2172f5187345174645c4ae68446cf811ae4</id>
    </parent>
  </parents>
  <author>
    <name>russel</name>
    <email>russel@d02f77da-47a5-474d-b610-f18e4bea325a</email>
  </author>
  <url>http://github.com/russel/gant/commit/2dc524b9c2679dcee68592a980ad3090d3c49cbe</url>
  <id>2dc524b9c2679dcee68592a980ad3090d3c49cbe</id>
  <committed-date>2009-10-18T12:12:48-07:00</committed-date>
  <authored-date>2009-10-18T12:12:48-07:00</authored-date>
  <message>Sort out getting Gradle to play well with Gant, Eclipse and IntelliJ IDEA over the Gant Ant task test which has to use files in specific locations.

git-svn-id: https://svn.codehaus.org/gant/gant/trunk@10432 d02f77da-47a5-474d-b610-f18e4bea325a</message>
  <tree>0fa7f164028b6d002ab9736099b43289a435f35b</tree>
  <committer>
    <name>russel</name>
    <email>russel@d02f77da-47a5-474d-b610-f18e4bea325a</email>
  </committer>
</commit>
