Hi,

without reading through the all linked information, it struck me, that most 
problems seem to come from a conflation of task and function. So instead of 
doing

task release << {
  project.version = getVersionFromUser()
  project.doRelease()
}

task testRelease << {
  project.doRelease()
}

they try to do this:

task getVersion << {
  project.version = getVersionFromUser()
}

task doRelease << {
  // Release magic.
}

task release {
  dependsOn [ project.getVersion, project.doRelease ]
}

task testRelease {
  dependsOn project.doRelease
}

Ok. Maybe oversimplified. But I hope it gets the point across.

I don't think that tasks are composable the way people think they are. Maybe 
more functionality of such problematic tasks should actually be put into 
functions/methods/procedures?

Sincerely
Meikel

-----Ursprüngliche Nachricht-----
Von: Luke Daley <luke.da...@gradleware.com>
An: user@gradle.codehaus.org
Gesendet: Mo, 12 Dez 2011, 12:38:54 MEZ
Betreff: Re: [gradle-user] Task execution order broken?


On 12/12/2011, at 11:32 AM, Andres Almiray wrote:

> Hmm, I could swear that task execution was ordered in 0.9.2; I'm going mad 
> perhaps ;-)

Yep, you're going mad :)

> Gradleware folks, I understand Gradle will inspect the DAG and optimize task 
> execution however I would very much like GRadle to honor my request and 
> execute some tasks as I specified.

There's a long discussion on why this is not a trivial matter.

http://issues.gradle.org/browse/GRADLE-427

If you're interested in this issue I suggest following that issue and adding 
your thoughts to the ticket.

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to