Mark your tasks inputs and outputs.  Something like:

task myTask {
  inputs.dir sourceDir
  outputs.dir destDir

  // process sourceDir and put output into destDir
}

I think the user's guide talks about this somewhere.


On Sun, Jul 11, 2010 at 9:09 AM, Matthias Bohlen <[email protected]>wrote:

> Hi,
>
> when I make the compile task depend on a custom task, Gradle always
> executes my task although it need not. How do I tell Gradle that my task is
> UP-TO-DATE?
>
> task myTask {
>   // do something that is a pre-requisite for compileJava
> }
>
> compileJava.dependsOn myTask
>
> Cheers
> Matthias
>
>

-- 
John Murph
Automated Logic Research Team

Reply via email to