Hi,

I've created a property of my root project called "repos" which is a closure 
where the repositories are configured. I can use this when configuring my 
subprojects (this part works). However, if I try to use this in my buildscript 
configuration, it can't find the property. I don't want to have to repeat the 
definition of the repositories. Any suggestions?

build.gradle:
def repos = {
      mavenLocal()
      mavenRepo urls: localRepoUrl
      mavenCentral()
}
buildscript {
      repositories repos  /* Error: groovy.lang.MissingPropertyException:
                                    No such property: repos for class:
                                    
org.gradle.api.internal.initialization.DefaultScriptHandler
                                    */
      /* OR */
      repositories owner.repos  /* Error: groovy.lang.MissingPropertyException:
                                          Could not find property 'repos' on 
root project 'workspace'
                                          */
      dependencies {
            classpath 'org.tmatesoft.svnkit:svnkit:1.3.4'
      }
}
...
subprojects {
      apply plugin: 'java'
      repositories repos  /* WORKS! */
}
...


Thanks,

Darren Evenson
ClickIQ, Inc.<http://www.clickiqinc.com/>

Reply via email to