On May 27, 2009, at 2:31 PM, Pfau, Matthias wrote:
<!-- /* Font Definitions */ @font-face {font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal,
li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-
size:12.0pt; font-family:"Times New Roman";} a:link,
span.MsoHyperlink {color:blue; text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed {color:blue; text-
decoration:underline;} span.EmailStyle17 {mso-style-type:personal-
reply; font-family:Arial; color:navy;} @page Section1 {size:595.3pt
841.9pt; margin:70.85pt 70.85pt 2.0cm 70.85pt;} div.Section1
{page:Section1;} -->
Hi together,
I understood that there is a semantic difference which is very
important to understand, in order to use gradle properly.
I tried to state, that I am a bit concerned about the little
syntactic difference between adding actions and configuring a task.
May I also add that describing the execution-behaviour of a task is
more important to me than describing its configuration. I therefore
think that “task myTask { … }” should definitely describe the
execution-behaviour.
We have discussed this a lot. And our answer for what is more
important is: It depends!
If your main use case if creating simple custom tasks. For example as
a wrapper for Ant tasks you are right. But if the major use case is
creating tasks with a custom type, then configuration is the main use
case.
e.g.
task myJar(type: Jar) {
<configure>
}
You usually don't want to append an action to such a Jar task. What
you always want to do is to configure the task.
Additionally there is the use case of configuring exisiting tasks (the
one for example added by the Java plugin). The major use case here is
configuration. Therefore we decided for 0.6. to make the notation not
context dependent (i.e. create vs configure existing task).
- Hans
Kind regards
Matthias
From: John Murph [mailto:[email protected]]
Sent: Dienstag, 26. Mai 2009 17:32
To: [email protected]
Subject: Re: [gradle-user] Changes in task definition dsl?
On Tue, May 26, 2009 at 7:04 AM, Pfau, Matthias <[email protected]>
wrote:
Hello Hans,
thanks for clearing this up. I just digged into the manual again and
saw, that you described my problem in Example 23.2.
Anyhow, the difference between adding actions to a task and
configuring a task is very small.
Hi Matthias,
When you say the difference is small, which of these do you mean:
1) There is little execution difference between configuring a task
and executing a task. Both closures run, after all, just at
slightly different times.
or
2) There is little syntactic difference between configuring a task
and executing a task. "task myTask { <configure> }" and "task
myTask << { <action> }" are very close.
There was some discussion regarding the new syntax before release of
0.6, and your clarification on what is concerning you would be
helpful.
--
John Murph
Automated Logic Research Team
--
Hans Dockter
Gradle Project Manager
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email