Ok, so when I build my plugin I get (for example) bas-plugins-l10n-1.0.0-SNAPSHOT.jar in ~/dev/sag/bas/trunk/modules/plugins-l10n/build/libs directory.
We have an init.gradle in ~/.gradle which adds in a global repo for all gradle projects. So I added in the plugin lib dir to the init.gradle as here: http://pastie.org/1706085 when I run my master build.gradle (which I would hope would make my plugin tasks available), I get this: Initialization script '/Users/phil/.gradle/init.gradle' line: 34 * What went wrong: Failed to notify build listener. Cause: Cannot add a resolver with name '1asi9sl04bsblaehqktckv7p1i' as a resolver with that name already exists. This error happens on this line of code: aadd flatDir(dirs:"~/dev/sag/bas/trunk/modules/plugins-l10n/build/libs") ideas? Also.... Assuming I can get the above to work somehow - how would I add in my aadd flatDir(dirs:"~/dev/sag/bas/trunk/modules/plugins-l10n/build/libs") in a different (non global) build script so that this flatDir repo is read before the remote artifact repository? Thanks for all the help! On Wed, Mar 23, 2011 at 2:43 PM, Benjamin Muschko < [email protected]> wrote: > > Hi Phil, > > You can definitely do that. You just need to define a flat directory inside > of your repositories closure (make sure it's within the buildscript > closure). > > buildscript { > repositories { > flatDir(dirs: "<dir-with-plugin-jar>") > mavenCentral() > } > > dependencies { > classpath ':<plugin-jar-name>:<plugin-version>' > } > } > > Ben > > > phil swenson wrote: > > > > I have a plugin project I am starting. Others in the company have > already > > written some plugins, but the way they have it set up to work is you have > > to > > upload a plugin to the artifact repository to actually execute it from > the > > build.gradle script(s). > > > > What I want is an ability to put the built plugin builds in a local > > directory and add that local directory as a "repository" ahead of the > > remote > > artifact repository. > > > > Could someone point me in the right direction? Seems to me this is how > > most > > people would dev their plugins... > > > > Thanks > > > > > > -- > View this message in context: > http://old.nabble.com/Gradle-custom-plugin-question-tp31223212p31223631.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 > > >
