I must have some cognitive disturbance because I am at a loss.
If my task C is 'clean' then I cannot dependsOn it in any task, correct?
Is there some other similar mechanism for use?
I mean if my task is create_distro, it seems logical for me to say dependsOn
clean correct?
I can not dependsOn clean in create_distro without forcing all others because
this ordering issue forces me to dependsOn chain all other involved tasks, I
can see no way around it. It appears that one has to abandon dependsOn
entirely in order, I am seriously just not getting it...
Right now I do this pattern:
task create_distro << {
[ clean, untax, jac, compileJava, classes, processResources, jar, images_jar
].each {println "doing --> $it";it.execute();}
}
Is this the recommended approach for ordering tasks?
I don't see how dependsOn can be used really at all because it interferes with
any attempts at reordering tasks, for example using it precludes what is
implied by this usage of the pattern correct?:
task create_distro_with_XXXXXXXXXX << {
[ clean, untax, jac, compileJava, XXXXXXXXXX, classes, processResources, jar,
images_jar ].each {println "doing --> $it";it.execute();}
}
Thanks,
Levi
--- On Sun, 7/17/11, Peter Niederwieser <[email protected]> wrote:
> From: Peter Niederwieser <[email protected]>
> Subject: [gradle-user] Re: dependency ordering>>?
> To: [email protected]
> Date: Sunday, July 17, 2011, 6:37 PM
> There is no such thing as an "ordered
> dependsOn list" in Gradle.
>
> task a(dependsOn: [b, c])
>
> is simply a shorthand for
>
> task a
> a.dependsOn(b)
> a.dependsOn(c)
>
> To turn this into a sequence, do:
>
> task a
> a.dependsOn(b)
> b.dependsOn(c)
>
> Isn't this good enough in your case?
>
> --
> Peter Niederwieser
> Principal Engineer, Gradleware
> http://gradleware.com
> Creator, Spock Framework
> http://spockframework.org
> Twitter: @pniederw
>
> --
> View this message in context:
> http://gradle.1045684.n5.nabble.com/dependency-ordering-tp4597282p4597645.html
> Sent from the gradle-user mailing list archive at
> Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email