Try this: project.publishClassLoader = new URLClassLoader(classpath as URL[], buildscript.classLoader)
Other things I noticed: - You create such a class loader both in task "migrate" and in task "createPublishClassLoader"; not sure if that's intended. - "project." is usually redundant in build scripts (but not in custom task classes) -- Peter Niederwieser Principal Engineer, Gradleware http://gradleware.com Creator, Spock Framework http://spockframework.org Twitter: @pniederw pledbrook wrote: > > Hi, > > I'm working with the grails-doc project at the moment: > > https://github.com/grails/grails-doc > > and have just hit a stumbling block. I have a new class, > 'grails.doc.macros.HiddenMacro', that I want to include as part of the > build. So I've put it in the buildSrc directory. > > In the main build file, I create a custom configuration called > 'publish' and I use this to create a new class loader: > > https://github.com/grails/grails-doc/blob/master/build.gradle#L178 > > The stumbling block I've hit is that I can't seem to get HiddenMacro > on the publishClassLoader's classpath. > > Any ideas how I can achieve what I want? > > Thanks, > > Peter > > -- > Peter Ledbrook > Grails Advocate > SpringSource - A Division of VMware > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > -- View this message in context: http://gradle.1045684.n5.nabble.com/buildSrc-class-in-custom-class-loader-tp4711747p4712851.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
