Ladislav, On Sun, 2011-08-21 at 19:37 +0200, Ladislav Thon wrote: > I'm no Gradle expert, but it looks to me that here
But you spotted something that moved things forward!
> gpars_groovyVersion = hasProperty('gpars_groovyVersion') ?
> gpars_groovyVersion : '1.7.10'
> dependencies {
> groovy group: 'org.codehaus.groovy', name:
> 'groovy-all', version: gpars_groovyVersion
> }
>
>
> hasProperty is called on Project object (the default delegate for the
> buildscript), while here
>
> dependencies {
> groovy group: 'org.codehaus.groovy', name:
> 'groovy-all', version: hasProperty('gpars_groovyVersion') ?
> gpars_groovyVersion : '1.7.10'
> }
>
>
>
> it's called on a DependencyHandler object, which is the delegate for
> dependencies closure --
> see
> http://www.gradle.org/current/docs/dsl/org.gradle.api.Project.html#org.gradle.api.Project:dependencies(groovy.lang.Closure)
>
>
> If I understand it correctly, you should call it like
> project.hasProperty(...). I wouldn't really consider it a bug, merely
> as an inconvenience in Gradle DSL (and there are plenty of them, if
> you ask me).
Spot on. Thanks for sorting me out.
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:[email protected]
41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected]
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
signature.asc
Description: This is a digitally signed message part
