[GRADLE-411] Replace doFirst and doLast with new args for createTask Created: 19/Feb/09 Updated: 04/Jan/13 Resolved: 31/Aug/09 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Improvement | ||
Reporter: | Jon Cox | Assignee: | Hans Dockter |
Resolution: | Won't Fix | Votes: | 0 |
Description |
For the reasons described in The anon / hard-to-skip task issue got me think about whether gradle would be better just augmenting createTask, createTask("hello") { println "hello world" } createTask("moo", doBefore: 'hello' ) { println "runs before hello task" } createTask("cow", doAfter: 'hello') { println "runs after hello task" } As I see it, the 'doAfter' feature is more useful than 'doBefore' Anyway, I'm hoping that by adding a few more bells & whistles |
Comments |
Comment by Hans Dockter [ 31/Aug/09 ] |
Hi Jon, I think this issue is partly bases on a misunderstanding. doFirst and doLast do not affect the execution order between tasks. They just add actions to a single task. With 0.7 we have a convenience notation for doLast by saying: task hello << { println 'Equivalent to doLast } |