Hi John,
thanks, that works if I split the declaration from the doFirst call
(otherwise Gradle complains that the distribution method can't be found):
task distribution(type: Zip, dependsOn: subprojects*.dists)
tasks.distribution.doFirst {task ->
// ...
}
It's a nifty solution, but I'm not sure whether I like it better than the
original. So I would welcome that more elegant solution :)
Thanks,
Levi
On Sat, Aug 22, 2009 at 10:18 PM, John Murph <[email protected]> wrote:
> How about:
>
> task distribution(type: Zip, dependsOn: subprojects*.dists).doFirst {
> task ->
>
> task.configure {
> // same subproject.each {...}
> }
> }
>
> I haven't tried this, but I think it will work. Basically, this postpones
> configuring the task until immediately before execution.
>
> I bet that Hans or Adam will come in here and offer a much more elegant
> solution, however. :)
>
>
> --
> John Murph
> Automated Logic Research Team
>