Newbie Question

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie Question

Russel Winder-2
In Gant I can do things like:

        includeTargets << gant.targets.Clean
        cleanPattern << [ '**/*~' , cvHtmlFile , cvFoFile , cvPdfFile ]

because Gant comes with a class Clean that defines various variables and
the targets clean and clobber.  Can someone tell me what the Gradle
equivalent is?  (Or more likely point me at the right bit of the
manual.)

Thanks.

--
Russel.
====================================================
Dr Russel Winder                 Partner

Concertant LLP                   t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,              f: +44 8700 516 084
London SW11 1EN, UK.             m: +44 7770 465 077

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Newbie Question

hans_d
Administrator

On Oct 9, 2008, at 10:16 AM, Russel Winder wrote:

> In Gant I can do things like:
>
>         includeTargets << gant.targets.Clean
>         cleanPattern << [ '**/*~' , cvHtmlFile , cvFoFile ,  
> cvPdfFile ]
>
> because Gant comes with a class Clean that defines various  
> variables and
> the targets clean and clobber.  Can someone tell me what the Gradle
> equivalent is?  (Or more likely point me at the right bit of the
> manual.)


Our clean task is primitive and only allows you to define the  
directory that should be deleted.

The logic is in org.gradle.api.tasks.Clean

It would be good if it were more powerful. There is no equivalent to  
clobber yet.

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Newbie Question

Russel Winder-2
On Thu, 2008-10-09 at 11:21 +0200, Hans Dockter wrote:

> On Oct 9, 2008, at 10:16 AM, Russel Winder wrote:
>
> > In Gant I can do things like:
> >
> >         includeTargets << gant.targets.Clean
> >         cleanPattern << [ '**/*~' , cvHtmlFile , cvFoFile ,  
> > cvPdfFile ]
> >
> > because Gant comes with a class Clean that defines various  
> > variables and
> > the targets clean and clobber.  Can someone tell me what the Gradle
> > equivalent is?  (Or more likely point me at the right bit of the
> > manual.)
>
>
> Our clean task is primitive and only allows you to define the  
> directory that should be deleted.
I guess that the delete Ant task is used for the actual cleaning?  If so
then all that is required is extension of the current class.

This covers only Clean though what about user defined classes and files
for compilation.  The Gant includeTargets and includeTool are fairly
general ways for people to structure things, Clean is just a specific
pre-defined example.

> The logic is in org.gradle.api.tasks.Clean
>
> It would be good if it were more powerful. There is no equivalent to  
> clobber yet.

I'll take a look and report back.

--
Russel.
====================================================
Dr Russel Winder                 Partner

Concertant LLP                   t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,              f: +44 8700 516 084
London SW11 1EN, UK.             m: +44 7770 465 077

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Newbie Question

Adam Murdoch-2


Russel Winder wrote:
On Thu, 2008-10-09 at 11:21 +0200, Hans Dockter wrote:
  
On Oct 9, 2008, at 10:16 AM, Russel Winder wrote:

    
In Gant I can do things like:

        includeTargets << gant.targets.Clean
        cleanPattern << [ '**/*~' , cvHtmlFile , cvFoFile ,  
cvPdfFile ]

because Gant comes with a class Clean that defines various  
variables and
the targets clean and clobber.  Can someone tell me what the Gradle
equivalent is?  (Or more likely point me at the right bit of the
manual.)
      
Our clean task is primitive and only allows you to define the  
directory that should be deleted.
    

I guess that the delete Ant task is used for the actual cleaning?  If so
then all that is required is extension of the current class.

This covers only Clean though what about user defined classes and files
for compilation.  The Gant includeTargets and includeTool are fairly
general ways for people to structure things, Clean is just a specific
pre-defined example.

  

We have plugins and tasks as the Gradle-provided general mechanisms for reuse (ignoring the fact that groovy is one giant reuse mechanism).

BTW, I had a (really quick) look for some docs on Gant target sets, but couldn't find any. Can you point me at some?


Adam --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
Reply | Threaded
Open this post in threaded view
|

Re: Newbie Question

Russel Winder-2
Adam,

On Fri, 2008-10-10 at 11:15 +1100, Adam Murdoch wrote:

> We have plugins and tasks as the Gradle-provided general mechanisms
> for reuse (ignoring the fact that groovy is one giant reuse
> mechanism).

I guess the question is how to structure tasks.  In Gant you can include
Gant files within other Gant files so this is source code inclusion --
this gives very simple target (aka task) structuring.   Gant doesn't
have plugins per se but you can include precompiled classes which have
an instantiation that allows them to manipulate the global state and so
can appear as classic plugin type things or they can just create new
targets.

I am sure Gradle has fundamentally the same thing it is a question of
mapping Gant idioms to Gradle idioms and not reinventing things.

> BTW, I had a (really quick) look for some docs on Gant target sets,
> but couldn't find any. Can you point me at some?

Probably not as I am not sure there is any :-(  This then leads to
classic (but still awful) comment of "read the source code" ;-)  Sorry
but the Clean and Maven classes are the only target sets there are
ready-made and they are not really finished.  The Execute and
Subdirectory tools are the only real ready-made tools and they are not
really finished either.  As you can tell I haven't really finished the
architecture so hadn't got round to documenting things.
 
--
Russel.
====================================================
Dr Russel Winder                 Partner

Concertant LLP                   t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,              f: +44 8700 516 084
London SW11 1EN, UK.             m: +44 7770 465 077

signature.asc (196 bytes) Download Attachment