Sonar is one of the most popular quality management tools that gives a complete analysis of a project in terms of lines of code, documentation, test coverage, issues, and complexities. As a developer, we are mainly interested in the following areas:
Duplicate lines of code
Lacking comments in the source code, especially in public APIs
Not following coding standards and best practices
Finding code complexity
Code coverage produced by unit tests
In this section, we will discuss Gradle integration with Sonar. The only prerequisite is, the Sonar server should be installed and running.
A prerequisite to run Sonar is to have Java installed on the box. Once prerequisites are met, you can install Sonar in just three simple steps as follows:
Download the distribution from http://www.sonarqube.org/downloads/ and unzip it.
Open a console and start the Sonar server:
On Windows platforms, start
On other platforms, start