Sorry for the late reply... I was pretty occupied with other stuff.
On 11.04.2011, at 00:23, Adam Murdoch wrote:
>
> On 11/04/2011, at 6:06 AM, Rene Groeschke wrote:
>
>> Hi Joern,
>> you may use init scripts for that. in your init script you could have
>> something like this:
>>
>> ---------------------
>> addListener(new ApplyPluginListener())
>>
>> class ApplyPluginListener extends BuildAdapter {
>> public void projectsEvaluated(Gradle gradle) {
>> gradle.rootProject.allprojects { apply plugin: 'announce }
>> }
>> }
>
> You can simplify this a bit:
>
> projectsEvaluated {
> rootProject.allprojects { apply plugin: 'announce' }
> }
>
Yes, that shortcut works equally well, thanks.
I tried it like this (with proper configuration, obviously ;)):
File: initSonar.gradle
//addListener(new ApplyPluginListener())
//class ApplyPluginListener extends BuildAdapter {
// public void projectsEvaluated(Gradle gradle) {
// gradle.rootProject.allprojects {
projectsEvaluated {
rootProject.allprojects {
apply plugin: 'sonar'
sonar {
serverUrl = "http://my.server.com"
globalProperty "sonar.jdbc.url",
"jdbc:mysql://my.server.com/sonar"
globalProperty "sonar.jdbc.driverClassName",
"com.mysql.jdbc.Driver"
globalProperty "sonar.jdbc.username",
"myusername"
globalProperty "sonar.jdbc.password",
"mypassword"
}
}
}
//}
But gradlew (1.0M2) complained the following:
./gradlew -I initSonar.gradle
* What went wrong:
org.gradle.api.internal.MissingMethodException: Could not find method sonar()
for arguments
[initSonar_6agn18jkguomiklphhkr4ih2d8$_run_closure1_closure2_closure3@4d8b7f9a]
on root project 'sulky'.
Cause: Could not find method sonar() for arguments
[initSonar_6agn18jkguomiklphhkr4ih2d8$_run_closure1_closure2_closure3@4d8b7f9a]
on root project 'sulky'.
Any idea what's wrong?
Cheers,
Joern.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email