On 2/04/10 9:43 PM, Russel Winder wrote:
I am finding that Gradle fails to re-run the tests if the code under
test changes:

         :compileJava
         :compileGroovy UP-TO-DATE
         :processResources UP-TO-DATE
         :classes
         :compileTestJava UP-TO-DATE
         :compileTestGroovy UP-TO-DATE
         :processTestResources UP-TO-DATE
         :testClasses UP-TO-DATE
         :test UP-TO-DATE

This seems to indicate a failure of the dependency analysis.


It does. In fact, the same problem happens for any task which takes a classpath that contains the classes directory, rather than jars. It decides that the classes directory hasn't changed (it still exists), rather than checking whether the contents of the directory have changed. No good reason for this, other than I haven't gotten to wiring it up yet. Could you add a JIRA issue for it?

A work around:

test.outputs.upToDateWhen { !compileJava.didWork }

As a side note, this would read better if upToDateWhen() was actually outOfDateWhen(). I wonder if we should rename it?

test.outputs.outOfDateWhen { compileJava.didWork }


--
Adam Murdoch
Gradle Developer
http://www.gradle.org


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to