On Mon, Feb 14, 2011 at 3:35 AM, Peter Niederwieser <[email protected]>wrote:
>
>
> Adam Murdoch-3 wrote:
> >
> > Absolutely. I think we should make the actual target object more
> explicit:
> >
> > myTask.extendWith(MyTaskExtension.class)
> > extendWith(MyProjectExtension.class) // implicit project.
> >
> > Or maybe something more like the apply statement:
> >
> > extend withType: MyProjectExtension
> > myTask {
> > extend withType: MyTaskExtension
> > }
> > dependencies.all { extend withType: MyDependencyExtension }
> >
> > Or even reuse (abuse?) the apply statement:
> >
> > apply type: MyProjectExtension
> >
>
> I'd say "mixin" is a good (and accurate) term for this.
I was also thinking about the mixin term. But then I thought extend is less
technical and more easily understood when reading it.
> Mixins are great for
> extending the domain model, but I think we need something simpler for use
> within build scripts. For example, I don't want to use a mixin for a
> "libraries" variable.
>
+1
Cheers
Hans
> --
> Peter Niederwieser
> Developer, Gradle
> http://www.gradle.org
> Trainer & Consultant, Gradle Inc.
> http://www.gradle.biz
> Creator, Spock Framework
> http://spockframework.org
>
>
> --
> View this message in context:
> http://gradle.1045684.n5.nabble.com/Dynamic-properties-for-projects-and-tasks-tp3378988p3384116.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
>
>
>