On 11/04/2011, at 5:57 AM, Joern Huxhorn wrote:

> Hi everyone,
> 
> is it possible to "inject" a plugin (as well as its configuration) into a 
> build without really adding it to the build file?

As Rene has mentioned, you can use an init script to do this. Over time, we 
will make this easier to work with.

We'd also like to provide some way to do this from the command-line, too. For 
example, if you run 'gradle idea' or 'gradle wrapper', Gradle should be able to 
infer which plugin can supply this task, and automatically apply it to the 
projects, if it hasn't already been done. This would be a fairly general 
mechanism, so it would probably just work for 'gradle sonar'. And maybe, later, 
even for 'gradle someTaskFromMyCustomPlugin'.


> 
> It would be quite nice to have this ability.
> 
> For example, the Announce plugin is very user/system-specific.
> Ubuntu Notify, Snarl & Growl are providing the same functionality, just for 
> different operating systems. Some would like announcements while some 
> probably don't. This is a question of personal taste and not of the build 
> process, in my opinion.
> 
> The fresh Sonar plugin is another example.
> I'd like to be able to just apply the Sonar plugin to any Gradle build 
> without adding an 'apply plugin: "sonar"' to the build file, configuring it 
> somewhere (most likely using system properties) as needed.
> The rationale for this is that I use Sonar on projects that I don't own. I 
> can do just that using the Maven Sonar plugin but I'm not aware how to do 
> this in Gradle.
> 
> Chances are that I just don't know yet *how* to do it properly.
> 
> Lastly, thanks a lot for implementing the Sonar plugin! I was really looking 
> forward to this feature.
> 
> Cheers,
> Joern.
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 


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