Hi Jerod,
On Jun 17, 2008, at 5:36 PM, JerodLass wrote:
Any ideas?
JerodLass wrote:
I am trying to add my own plugin to gradle, extending java (though
I don't
know if this is completely necessary). I have based the groovy
source for
my plugin and convention on those of gradle's 'groovy' and 'java' and
'war' plugins. At this point, where do I need to put my
myplugin.groovy
file and/or how do I tell gradle to look for it? I am new to build
systems so feel free to assume I don't know anything and all I
have are
groovy files I wrote (this is pretty much the case).
there are two ways to add something to the build script classpath. Be
it a plugin or any other code.
1.) Via a settings.gradle file (in the root dir of _your_ project)
2.) Via the buildSrc folder (in the root dir of _your_ project)
See also chapter 15 of the user's guide.
If a plugin is somewhere in the buildscript classpath you can call it
with:
usePlugin('com.jerod.MyPlugin')
You don't need to modify the plugin.properties file.
I tried building this in a standalone project with gradle using
the groovy
plugin, hoping I could drop the resulting jar in gradle's lib
folder and
add a line to plugin.properties, but this didn't work for me. I
would
like my plugin to extend the java plugin, and I don't know how
this would
work. I have uploaded the files I have so far, Plugin1.groovy,
Plugin1Convention.groovy, and my gradlefile.
http://www.nabble.com/file/p17809485/Plugin1.groovy Plugin1.groovy
http://www.nabble.com/file/p17809485/Plugin1Convention.groovy
Plugin1Convention.groovy
http://www.nabble.com/file/p17809485/gradlefile gradlefile
It failed when I tried compiling, and I got a strange error citing
"no
signature of method: java.util.HashMap.plus() is applicable for
argument
types: (java.util.HashMap) values: {["debug":"true"]}"
on the line:
javac([source:'1.5', target:'1.5'] + ["debug":"true"]){
This looks like a correct statement. Could you paste more of this
snippet?
I'm wondering if there could be something wrong with my groovy
compiler
configuration...
Jerod
--
View this message in context: http://www.nabble.com/adding-my-own-
plugin-tp17809485p17916444.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