Articles → SONARQUBE → Integrate Sonarqube With Gradle
Integrate Sonarqube With Gradle
Steps
- Download gradle from https://gradle.org (in the zip format)
- Unzip the file and put it inside ‘c:\gradle’.
- Set the path of gradle in environment variables
Click to Enlarge
- Create a sample android project and open build.gradle.
- Inside the file, write the following code on the top.
plugins{
id "org.sonarqube" version "2.7"
}
- Above dependencies, add the following line
sonarqube{
properties{
property 'sonar.demo_android_project_gradle_integration', 'Project Descp'
}
}
- Sync the gradle to make sure there are no errors.
- Open command prompt
- Go to the path where build.gradle is there using cd command.
- Write the following command
Click to Enlarge
Click to Enlarge