On 27/02/2011, at 6:00 AM, Hamlet D'Arcy wrote:

>>> At the moment, our strategy is to bundle third-party Jars with Gradle. This 
>>> will change as
>>> soon as we have a plugin system that can download plugins and plugin 
>>> dependencies
>>> on-the-fly (see http://gradle.codehaus.org/Gradle+1.0+Plugin+System).
> 
> Since CodeNarc is just a jar file, I was hoping there was some way I
> could add a dependency on the new version and then force the new
> version onto the classpath first, before the one bundled with Gradle.
> Maybe this is unsafe, but is it possible?

You might try this, before you apply the code-quality plugin:

configurations { customCodeNarc }
dependencies { customCodeNarc '....' }

configurations.customCodeNarc.each { f ->
    Project.class.classLoader.addURL(f.toURI().toURL())
}

You only need to do this once per build, so you might do so in the root project.


> 
> 
> 
> 
> On Sat, Feb 26, 2011 at 6:17 PM, Hamlet D'Arcy <[email protected]> wrote:
>> Hi all,
>> 
>> Is it possible to specify the version number of CodeNarc within the
>> code-quality plugin?
>> 
>> All of the versions of CodeNarc are in Maven Central, and it is just a
>> Java JAR file. I'm hoping I can upgrade my codenarc version without
>> upgrading gradle.
>> 
>> Thanks,
>> 
>> --
>> Hamlet D'Arcy
>> [email protected]
>> 
> 
> 
> 
> -- 
> Hamlet D'Arcy
> [email protected]
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to