Ok, the extension hierarchy seems to cover all the new requirements. I'll
go this way until anyone else will post a better solution.




2014-07-02 0:44 GMT+02:00 Andrew Oberstar [via Gradle] <
ml-node+s1045684n5712780...@n5.nabble.com>:

> Agree about the tasks.sonarRunner {} approach not looking so great.
>
> One option could be to subclass SonarRunnerExtension with a
> SonarRunnerRootExtension that has the new properties. The root extension
> would only be used on the project the plugin is applied to. The other
> projects would use the old extension. However, I'm not sure if there are
> any other cases where the same extension name maps to a different class
> depending on the project.
>
> Otherwise, this is still an incubating plugin, so maybe the devs would be
> alright with breaking some compatibility?
>
>
> Andy
>
>
> On Tue, Jul 1, 2014 at 3:03 PM, zeeke <[hidden email]
> <http://user/SendEmail.jtp?type=node&node=5712780&i=0>> wrote:
>
>> As suggested by Luke Daley, I move the discussion here from  github
>> <https://github.com/gradle/gradle/pull/257>  .
>>
>> I'm going to implement the "fork mode" for SonarQube analysis with the
>> following specification:
>>
>> - Remove non forking mode entirely
>> - Allow choice of Sonar runner version
>> - Change default version to 2.3
>>
>> Currently, the SonarRunner plugin creates a SonarRunnerExtension for each
>> Java project in the current build config. It allows to configure sonar
>> runner properties for each project.
>>
>> Now we have a bit more configuration to offer to users, including:
>> - The sonar-runner version
>> - The java options to use when forking the new process
>>
>> I can't put this info in the same extension because it will be applied to
>> subprojects too and it would be meaningless.
>>
>> The only way I see is to put some filed in the task and to allow users to
>> configure it as following:
>>
>> sonarRunner {
>>   // This is the already in place SonarRunnerExtension
>>   // Each project can have one
>>   sonarProperties {
>>     // ...
>>   }
>> }
>>
>> tasks.sonarRunner {  // There is an alias with the extension. The plugin
>> creates only one task.
>>
>>   toolVersion = '2.3'
>>   forkOptions {
>>     // ...
>>     maxHeapSize = '1024m'
>>   }
>> }
>>
>> I think this is not a very nice solution but it is the best we can do if
>> we
>> don't want to break too much backward compatibility.
>>
>> Any suggestion?
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://gradle.1045684.n5.nabble.com/GRADLE-2587-Provide-option-to-fork-Sonar-analysis-tp5712779.html
>> Sent from the gradle-dev mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://gradle.1045684.n5.nabble.com/GRADLE-2587-Provide-option-to-fork-Sonar-analysis-tp5712779p5712780.html
>  To unsubscribe from GRADLE-2587 Provide option to fork Sonar analysis, click
> here
> <http://gradle.1045684.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5712779&code=cGFuYXR0b25pLmFuZHJlYUBnbWFpbC5jb218NTcxMjc3OXwxMzk3Nzk5Mzcy>
> .
> NAML
> <http://gradle.1045684.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://gradle.1045684.n5.nabble.com/GRADLE-2587-Provide-option-to-fork-Sonar-analysis-tp5712779p5712781.html
Sent from the gradle-dev mailing list archive at Nabble.com.

Reply via email to