Hi,

If I define a variable at the top of "build.gradle", like 
https://github.com/evgeny-goldin/teamcity-plugins/blob/5445b9c61bba62ecbbcc04042be731677ebefe70/build.gradle#L1
"def groovyVersion = '1.8.0'"  then I can use this version when dependency
is defined inside allprojects { .. } or subprojects{ .. }. 

But I can't use it inside buildscript{ .. } - always get:


groovy.lang.MissingPropertyException: No such property: groovyVersion for
class:
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHand
ler
        at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:49)
        at
org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:239)
        at
build_8r478vgrcc0870j2douhtdhgl$_run_closure1_closure3.doCall(D:\Projects\teamcity-plugins\build.gradle:26)


Is this a bug or desired behavior? Thanks!

-----
Best regards,

Evgeny

evgeny-goldin.com 

--
View this message in context: 
http://gradle.1045684.n5.nabble.com/Script-variables-are-not-seen-inside-buildscript-tp4481994p4481994.html
Sent from the gradle-user mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email


Reply via email to