Levi Hoogenberg wrote:
Thanks, adding 'processTestResources' to the dependsOn parameter did the trick (my tests are in a separate project, so I don't have any main code or resources).

It would be nice to have an extra option when overwriting tasks, whether task dependencies should be inherited. This would allow tasks to change their dependencies without breaking overriding tasks.


A good idea. Could you add a JIRA issue so we don't forget?

Thanks again,
  Levi

On Fri, Jul 24, 2009 at 8:11 AM, Adam Murdoch <[email protected] <mailto:[email protected]>> wrote:



    [email protected] <mailto:[email protected]> wrote:
    I just downloaded Gradle 0.7 and most of my tests fail when I try
    to use it. They ran fine on 0.6. An expression like

    Thread.currentThread().getContextClassLoader().getResource("logback.xml")

    returns null. (It's in src/test/resources.)

    I'm not using Gradle's TestNG setup by the way (I still need to
    take a look whether all of the options I need are supported); I'm
    replacing the test task with one that delegates to the ant task.
    The classpath of that ant task includes the test classes
    directory (to which the test resources are copied).


    What are the dependencies of this test task? It will need to
    depend on (compile, processResources, compileTests,
    processTestResources) because of the changes to the java plugin
    dependencies.


    Is this a bug or should I be doing something different with the
    new classloader changes?

    You shouldn't need to do anything different because of classloader
    changes.


    Adam


Reply via email to