See the user guide.

Dependencies are in no guaranteed order.
The current order in alphabetical to have the same sequence with every build, 
but that is an implementation detail.

The execution order is defined when the output-input characteristic requires it.

cheers
Dierk

Am 24.11.2010 um 16:09 schrieb Gretar Arnason:

> Hi, I've was just trying out something and was wondering if the following is 
> an expected behavior (using 0.9-rc-2)
> 
> in build.gradle file:
> 
> task a << {
>     println "a"
> }
> 
> task b << {
>     println "b"
> }
> 
> task c (dependsOn: ["b","a"]) << {
>     println "c"
> }
> 
> 
> gives me the the output when running >gradle -q c:
> a
> b
> c
> 
> I was expecting to see:
> b
> a
> c
> 
> Is my intuition just wrong? 
> I would think that the order of dependencies should be respected if the tasks 
> being depended on do not have any dependencies defined themselves.
> If I'm wrong about this can someone then explain here to me then what I 
> should expect and why?
> How could I get the same effect without adding explicit dependency between a 
> and b?
> 
> Thanks
> gretar

Reply via email to