>> Let's say I have a Grails plugin that provides an extra Gradle task
>> for the build. This task requires an external dependency. Since it's a
>> task, that dependency needs to be on the build classpath.
>>
>
> When you say 'plugin', you mean a Grails plugin, rather than a Gradle
> plugin, yes?
Where I've said "Grails plugin", I do mean a Grails plugin. "plugin"
on its own refers to a Gradle plugin. Sorry, I know it's confusing. It
makes it really difficult for plugin names: what's a Grails Gradle
Plugin? A plugin that allows you to use Gradle from Grails, or a
plugin that allows you to build Grails projects in Gradle? :)
> How does the whole process get kicked off? Is this from a Gradle plugin
> which loads up the Grails plugins and does some stuff with them? Or some
> other way?
Yes, the Gradle plugin creates a task that loads the Grails plugins,
builds them from source if necessary, and does some other stuff.
Ideally, the plugin should load the plugins in the execution phase
because it's a fair bit of overhead that may not be necessary for all
tasks.
> In what form do you have the classpath for the Grails plugins and this
> external dependency? A jar? Some Grails dependency definitions? A
> ClassLoader?
Typically sourceSets.main.runtimeClasspath or
sourceSets.plugin.runtimeClasspath. It may be a dependency definition,
like "org.grails:grails-core:1.2.0", or a physical file/directory.
Cheers,
Peter
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email