Skip to end of metadata
Go to start of metadata

Features

The Gradle SonarQube plugin provides an easy way to start SonarQube analysis of a Gradle project.

The ability to execute the SonarQube analysis via a regular Gradle task makes it available anywhere Gradle is available (developer build, CI server, etc.), without the need to manually download, setup, and maintain a SonarQube Runner installation. The Gradle build already has much of the information needed for SonarQube to successfully analyze a project. By preconfiguring the analysis based on that information, the need for manual configuration is reduced significantly. 

 

Compatibility

The Gradle SonarQube Plugin version 1.0 is compatible with Gradle versions 1.12+ and SonarQube versions 3.7+.

Users of Gradle Sonar or Sonar Runner Plugins ?

The existing Gradle Sonar Runner and Gradle Sonar plugins, which are part of the Gradle distribution, should no longer be used (See this official note from the Gradleware team). The use of the Gradle SonarQube plugin is recommended instead.

Installation

Installation is automatic, but certain global properties should still be configured. A good place to configure global properties is ~/.gradle/gradle.properties. Be aware that we are using System properties so all properties should be prefixed by systemProp.

 

gradle.properties
systemProp.sonar.host.url=http://localhost:9000
systemProp.sonar.jdbc.url=jdbc:postgresql://localhost/sonar
systemProp.sonar.jdbc.username=sonar
systemProp.sonar.jdbc.password=sonar


#----- Security (when 'sonar.forceAuthentication' is set to 'true')
systemProp.sonar.login=admin
systemProp.sonar.password=admin
  • No labels