build.gradle ---------- allprojects { apply plugin: 'java' apply from: 'http://myserver/jalopy.gradle'jalopy { repository = false } } ---------- jalopy.gradle ---------- buildscript { repositories { mavenRepo name: 'plugins-repo', urls: 'http://myserverlibs-release' } dependencies { classpath ( [group: 'jalopy', name: 'jalopy', version: '1.9.5'], [group: 'jalopy', name: 'jalopy-gradle', version: '1.9.5'] ) } } apply plugin: 'jalopy' ----------
I'm confused what snippet is what in your post above.
The first snippet is the actual build script (build.gradle). The second one is the code that should load the plugin dependency (jalopy.gradle) and is applied from within the actual build script.
Applying external gradle build files using the "apply:from:ANY_URL" is not the same as writing a 'real' plugin.
That I do know ;) I'm not trying to write a plugin this way, rather to import an external plugin.
For using the apply:plugin:'jalopy' you have to implement the org.gradle.api.Plugin Interface AND add a plugin descriptor to the jar file your plugin is bundled in.
That code sits in the jalopy-gradle module that should be imported into the build script.
The apply plugin: 'jalopy' approach works fine, if I include the dependency information right with the build script (or via an init script). But than I'm curious and want to import it from another script which could it make a bit easier for customers to manage the external dependency. It might not be possible to have some buildscript dependency executed at this point. But none of my other experiments seemed to work either.
Managing external plugin references seems to be a weak spot. The daemon does not work either, when used with such a dependency.
Thanks much for your input. Cheers, Marco --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
