Steve,

Thanks for the prompt reply, much appreciated.  On the one hand your
reply is stress relieving, on the other hand it is stress creating!

On Sat, 2009-07-18 at 08:47 -0400, Steve Appling wrote:
> 
> Russel Winder wrote:
> > I am experimenting with a Gradle build.  I have the task:
> > 
> >         task refresh ( dependsOn : 'jar' , description : 'Refreshes the jar 
> > in the jar directory.' ) {
> >           ant.copy ( file : buildDir.path + 
> > System.properties.'file.separator' + archivesBaseName + '-' + version + 
> > '.jar' , toDir : 'jar' )
> >         }
> > 
> 
> You are running the copy during the configuration phase.  I think you want:
>       task refresh ( dependsOn : 'jar' , description : 'Refreshes the jar in 
> the 
> jar directory.' ) << {
>         ant.copy ( file : buildDir.path + System.properties.'file.separator' 
> + 
> archivesBaseName + '-' + version + '.jar' , toDir : 'jar' )
>       }
> 
> Note the "<<"
> 
> This is a subtle and confusing detail.

Too damn right.  Anyone coming from an earlier version of Gradle is
going to hit this problem.  I thing there needs to be some health
warnings about:

        task X ( . . . ) { . . . }
        task X ( . . . ) << { . . . }

-- 
Russel.
=============================================================================
Dr Russel Winder      Partner
                                            xmpp: [email protected]
Concertant LLP        t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,   f: +44 8700 516 084   voip: sip:[email protected]
London SW11 1EN, UK   m: +44 7770 465 077   skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to