All dependencies of a task are executed even if said task is skipped because it's inputs/outputs are up-to-date.
In your case, to avoid the "exportMessages" task executing every time, you'll need to enable up-to-date checking for the "exportMessages" task as well. You do this by declaring the task inputs/outputs. I can't be sure, but it seems likely that some of the inputs you're declaring for "generate" are actually inputs to "exportMessages". A very easy way to configure inputs/outputs is to use the @Input, @InputFile and @OutputFile annotations on the task. Not really documented anywhere official, but you can get a good idea at: http://mrhaki.blogspot.com/2010/10/gradle-goodness-add-incremental-build_14.html cheers Daz > > On Wed, Jul 20, 2011 at 3:12 PM, phil swenson <[email protected]> > wrote: > > > This code is for a "generate" task that dependsOn "exportMessages", > > which populates a directory "convention.localizationOutputPath" with > > some files that conform to 'LFW_*Messages-*.xml' > > > > So basically what I'm looking for is if the files in the file tree > > exist on an subsequent execution, I wouldn't expect the > > "exportMessages" task to execute. But "exportMessages" executes every > > time. > > -- Darrell (Daz) DeBoer Principal Engineer, Gradleware http://www.gradleware.com
