Showing posts from June, 2015

Migrating to sonarqube gradle plugin

Sonarqube recently released a gradle sonarqube plugin.  This replaces the sonar runner plugin provided by gradle.

Migrating to the new plugin is fairly straightforward and involves the following changes:
Replace apply plugin: "sonar-runner"


apply plugin: "org.sonarqube"

or using the style of the new plugin mechanism (gradle 2.1 and above)

plugins {
  id "org.sonarqube" version "1.0"
Replace sonarRunner {
    sonarProperties {


sonarqube {
    properties {
Move global sonarqube properties to - either in ~/.gradle or in your project base directory.  Use systemProp prefix to indicate system property

#if  authentication enabled

As per documentation,…

Eclipse Mars and gradle support

Eclipse 4.5 a k a Mars was released yesterday (24 June 2015) on schedule.  Among other features is the first-class support for gradle (hitherto available through gradle integration for eclipse).

Gradle support in Mars is through Buildship Eclipse Plug-in, which can be installed through Eclipse Marketplace.

Once installed, an existing gradle project can be imported by using the Import... option of Eclipse

Choose an existing gradle project.  I chose a recent android project created using Android Studio.  Note however that this plugin has nothing to do with android and does not add support for android projects built using Android Studio/Gradle.

Navigate the wizard

I chose the default - the options are self-explanatory

There is this warning based on the version of gradle used.  It appears that the plugin works best with the latest version of gradle.

Once imported, the following views show up.  One being Gradle Tasks, that allow you to see tasks available and run.

On running, you see the …