Adam Murdoch wrote:
>
> A main use case for the callbacks is to provide default values before the
> configuration closure is applied:
>
> // in my root build.gradle, or some plugin:
> tasks.withType(Jar).all { destinationDir = 'someDir' }
>
> // in my build script
> task myJar(type: Jar) {
> destinationDir = 'some-other-dir'
> }
>
The problem is that both scenarios are feasible. The one where the parent
script provides defaults, and the one where it enforces/overrides values.
Maybe we could support both? E.g.
tasks.withType(Jar).defaults { ... }
tasks.withType(Jar).enforce { ... }
--
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/Configuring-tasks-before-they-are-added-to-the-task-container-tp4875703p4878415.html
Sent from the gradle-dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email