On Fri, 2009-03-27 at 11:34 -0400, Steve Appling wrote: > Russel Winder wrote: > > Is there any way of extending the initial classpath used by Gradle. > > There is no -cp --classpath type option and setting the CLASSPATH > > environment variable appears to do nothing. > > If you are just wanting to add libraries to the classpath for use in > your build scripts, you can add them as a dependency in settings.gradle.
The user guide is a bit short of examples on using settings.gradle and all the discussion is in terms of multi-project builds. Rather than trying to talk in generalities, maybe a small specific example is in order. I am trying to use the Cobertura plugin in a single-project project (there is just a single artefact generated and that is a jar). I don't want to "pollute" the Gradle libs directory with the jars needed by the plugin, I want to have the plugin sitting in its own directory with its jar and libs sub-directories. Dealing with the transitive dependencies of the plugin is not too big an issue, that can be handled by a flat file resolver added to the dependencies list. The problem is the plugin jar itself. There seems no alternative to having it in the Gradle directory since this is the only way Gradle can find it in the usePlugin ( org.gradle.api.plugins.cobertura.CoberturaPlugin ) statement. Or perhaps there is a way of loading a jar in settings.gradle so it can be used in build.gradle? -- Russel. ============================================================ Dr Russel Winder Partner Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203 41 Buckmaster Road, f: +44 8700 516 084 voip: sip:[email protected] London SW11 1EN, UK. m: +44 7770 465 077 xmpp: [email protected]
signature.asc
Description: This is a digitally signed message part
