I'm no Gradle expert, but it looks to me that here
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).
LT