The Sonar Runner plugin

Sonar is one of the most popular quality management tools which gives complete analysis of a project in terms of lines of code, documentation, test coverage, issues and complexities. Gradle provides seamless integration with Sonar. The only prerequisite is that sonar server should be installed and running. Details on Sonar can be found at http://www.sonarqube.org/.

To run sonar runner plugin, we just need to apply plugin sonar-runner and configure it to connect to the sonar server.

Create build file build_sonar.gradle for your project with the following contents:

apply plugin: 'groovy' apply plugin: 'eclipse' apply plugin: "sonar-runner" repositories { mavenCentral() } version = '1.0' sonarRunner { sonarProperties { property ...

Get Mastering Gradle now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.