Steve Appling wrote:


Adam Murdoch wrote:


Steve Appling wrote:
I am still having some problems related (I think) to the unmanagedClasspath changes. I can't get our buildSrc to work now.
Previously we had to do the following in the buildSrc/build.gradle:
  compile.groovyClasspath = org.gradle.util.BootstrapUtil.groovyFiles
testCompile.groovyClasspath = org.gradle.util.BootstrapUtil.groovyFiles compile.unmanagedClasspath(org.gradle.util.BootstrapUtil.gradleClasspath as File[])

I have tried several combinations to get this working, but still can't get the gradle files on the classpath in buildsrc. I get errors like "unable to resolve class org.gradle.api.Project".

I am currently just trying to add the gradle files to the compile classpath using:
dependencies {
   compile files(org.gradle.util.BootstrapUtil.gradleClasspath)
}

This still doesn't work - I would appreciate any other ideas to try. Perhaps this will make more sense on Monday :)



This is from the default buildSrc build script, which should work for you:

dependencies {
   compile files(org.gradle.util.BootstrapUtil.gradleClasspath)
   groovy files(org.gradle.util.BootstrapUtil.groovyFiles)
}


It looks very similar to what you are trying, so I'm not confident. If you are still getting failures, can you try again with the -s flag, so we can see where the failure is?


Adam


I think I have figured this out. BootstrapUtil.gradleClasspath and groovyFiles return a list of File objects. Using these with Project.files ends up resulting in invalid classpaths because they are interpreted as relative paths to the buildSrc directory.


I wonder why this works in some places (eg on my machine, and the codehaus bamboo servers) and not others (eg your machine). Which OS and java version are you using?


Adam


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

   http://xircles.codehaus.org/manage_email


Reply via email to