I’ve just remembered that we don’t document the fact that we generate the 
methods that the guy is asking about below, and more largely we don’t have any 
documentation about class decoration. This is a problem.

Many of our examples use this style and we have no explanation anywhere of why 
this works and where it can be used. If it were an option I’d say let’s remove 
this feature (I know I was a big fan at its inception), but it’s now firmly 
entrenched. So, we should document it somehow. Question of course is what kind 
of priority this has relative to other work.

As an aside, this is the kind of “magic” I think we should aim to avoid in the 
future. It’s not the necessarily the class decoration or feature that’s the 
problem, but that for all intents and purposes this is “magic” as users have no 
practical way of understanding this besides poreing through obscure source 
code. This hurts our “approachability”. This is no revelation I know.
On 14 August 2014 at 6:39:02 am, Gradle (noreply.gra...@getsatisfaction.com) 
wrote:

Gradle

jnizet just asked this question in Gradle:
Why can I set a task property without using = ?
Today I realized that I used the following in my build:

war {
archiveName 'ROOT.war'
}

and that it worked fine, although the [War task 
documentation](http://www.gradle.org/docs/current/ds...) doesn't list any 
*method* named `archiveName`. The task has a *property* named `archiveName`, 
and I'm thus surprised I don't have to use the following syntax to set the 
archive name:

war {
archiveName = 'ROOT.war'
}

So, to help me in my quest to better understand groovy and gradle, could 
someone tell me

- if setting a property without using `=` is a groovy thing, or if it's a 
gradle thing
- if this is documented somewhere (I searched hard, but didn't find anything)
- if it's a good practice or not
- if this syntax is usable for any property of any object, or if it's limited 
to some types of objects/properties
- how and where it is implemented (if it's a gradle thing)

Thank you.
REPLY
View conversation in the community
Notify me when people reply
This message sent from the Gradle community on Get Satisfaction.
To unsubscribe or change your email settings, click here. Don't reply directly 
to this email.
Create a customer community for your company at GetSatisfaction.com.


Reply via email to