Hi,
I'd like to refine some of the terminology relating to tasks, and I'm looking
for some ideas.
There are a few styles for defining tasks.
The first style is where you don't declare a type for the task. The task
basically does nothing until you add some actions or dependencies to it:
task myTask {
doLast { some stuff }
}
or
task myTask << { some stuff }
A second style is where you do declare a type for the task. The task has some
inherent behaviour due to its type. It also has some properties which you may
or may not configure:
task myTask(type: SomeType) {
someProp = 'value'
}
A third style is where a plugin adds the task on your behalf. The task ends up
with some behaviour, whichever way the plugin decides to add it. You may or may
not configure the task further:
test {
systemProperty 'prop', 'value'
}
So, what should we call these things?
In a few spots, the user guide refers to the first 2 styles as 'simple' and
'enhanced' tasks. To me, this doesn't really capture the essence of these
styles. I'd prefer something like 'untyped' and 'typed' tasks, as this better
reflects the difference between the 2: the first style is a unstructured and
opaque to Gradle, and the second style is a little more structured and
describes more about itself to Gradle.
The third style could perhaps be called 'pre-defined' or 'standard' tasks.
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz