On Jun 18, 2008, at 3:52 PM, JerodLass wrote:




hdockter wrote:


As said in the other mail. You use the buildSrc root folder of your
project not of Gradle.

The question is, if there are multiple projects supposed to use your
plugin or not. If so, it would make sense to have a stand alone build
for your plugin. The resulting jar could be uploaded to a repository.
Via the settings.gradle file you would add this jar to the build
script classpath of the other projects. If only a single project
needs this plugin, it might be not necessary to use a plugin at all.
After all you can create the tasks and properties directly in your
project build script, possibly using helper classes defined in the
buildScr folder.

- Hans

Hans Dockter
Gradle Project lead
http://www.gradle.org



I would like to have a standalone build for this plugin if I can. This is also how I plan on separating out common build logic for all projects I might work with. I've changed my plugin project a lot as well as the build script and I have a different error, which I have included a screenshot of:

http://www.nabble.com/file/p17983171/pluginerror.JPG pluginerror.JPG
http://www.nabble.com/file/p17983171/build.gradle build.gradle

The groovy jar is not in your classpath. See the first paragraph of chapter 10 in the user's guide.


When I get this working, what do I need to put in the settings.gradle file
in order for it to recognize the plugin?

Nothing special. You just have to add the jar to the build script classpath.

settings.gradle:
dependencies('org.jerod:mavenPlugin:1.0')

build.gradle:
usePlugin('org.jerod.MyMavenPlugin') // fully qualified name your plugin class.

See also chapter 15 of the user's guide.

- Hans

I only have experience adding
dependencies as they relate to java compilation, so where do I need to put the plugin.jar or how do I get it from the repository before gradle starts
looking for it?  I appreciate all of this help very much.

-Jerod
--
View this message in context: http://www.nabble.com/adding-my-own- plugin-tp17809485p17983171.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



--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

   http://xircles.codehaus.org/manage_email


Reply via email to