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 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.