Am 07.05.11 08:59, schrieb Marco Hunsicker:
Howdy,

regarding plugin integration I've found an older thread that speaks about the "apply from:" syntax: <http://gradle.1045684.n5.nabble.com/Plugin-repository-td1437702.html>.

I've played with this approach, but could not get it to work.

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'
----------


But it does not work:

FAILURE: Build failed with an exception.

* Where:
Script 'http://myserver/jalopy.gradle' line: 14

* What went wrong:
A problem occurred evaluating script.
Cause: Plugin with id 'jalopy' not found.


Am I just doing something wrong? Or is it not (yet) possible to integrate an external plugin this way? Thanks.

I'm confused what snippet is what in your post above. But anyway: Applying external gradle build files using the "apply:from:ANY_URL" is not the same as writing a 'real' plugin. The older days, the gradle syntax for applying other gradle files was "plugin:from....", that's why many (me too) called these external (script) plugins.

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. Have a look at the userguide for detailed information (example 40.5): http://gradle.org/current/docs/userguide/custom_plugins.html#N147B2

regards,
René



Cheers,

Marco

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

   http://xircles.codehaus.org/manage_email



--
-----------------------
regards René

rene groeschke
http://www.breskeby.com
@breskeby


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

   http://xircles.codehaus.org/manage_email


Reply via email to