[GRADLE-1356] Order of dependencies is not honored Created: 27/Jan/11  Updated: 04/Jan/13  Resolved: 27/Jan/11

Status: Resolved
Project: Gradle
Affects Version/s: 0.9.2
Fix Version/s: 1.0-milestone-1

Type: Bug
Reporter: Jay Guidos Assignee: Peter Niederwieser
Resolution: Not A Bug Votes: 0

Issue Links:
Duplicates GRADLE-427 dependsOn doesn't respect dependency ... Resolved


Here is a small gradle script:

task cTask << { println "C" }
task aTask << { println "A" }
task dTask << { println "D" }

task testIt( dependsOn: [ dTask, cTask, aTask ] )

No matter what order I put the dependencies, they are always executed in the task name alphabetical order. Here is the output of the above script:

gradle testIt


Total time: 1.831 secs

Process finished with exit code 0

Comment by Peter Niederwieser [ 27/Jan/11 ]

Works as designed. If you need D to be run before C, you have to make C depend on D.

Comment by Hans Dockter [ 28/Jan/11 ]

There are some scenarios people want to solve with ordering that can't be properly modelled with dependsOn relations. Nor do we think ordering is the right approach. There is already an issue for that: http://jira.codehaus.org/browse/GRADLE-427

I make this a duplicate.

Generated at Wed Jun 30 11:53:29 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.