On 07/05/2011, at 4:59 PM, Marco Hunsicker wrote:

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

Looks like a bug. The apply statement is not using the classpath of the script 
to resolve the 'jalopy' plugin id, but should. Could you add a jira issue for 
this?


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to