-
Notifications
You must be signed in to change notification settings - Fork 8
SonarQube
Thomas Amberg edited this page Nov 23, 2020
·
29 revisions
Installing a local instance of the SonarQube service.
-
Download sonarqube-8.5.1.38104.zip
-
Unzip sonarqube-8.5.1.38104.zip as a non-root user.
-
On Windows, run sonarqube\bin\windows-x86-64\StartSonar.bat
-
On MacOS or Linux, run sonar.sh as a non-root user, e.g.
$ cd sonarqube-8.5.1.38104/bin/macosx-universal-64 $ ./sonar.sh console
For details, see https://docs.sonarqube.org/latest/setup/get-started-2-minutes/
- Open http://localhost:9000/
- Create a new project, select Java, Gradle
- Generate YOUR_SONARQUBE_PROJECT_TOKEN
-
Open your Android project
-
Open the build.gradle file
-
After the buildscript { ... } block, add
plugins { id "org.sonarqube" version "2.7" }
-
Open a terminal, type:
$ cd YOUR_ANDROID_PROJECT_PATH $ chmod +x gradlew $ ./gradlew sonarqube \ -Dsonar.projectKey=blinky \ -Dsonar.host.url=http://localhost:9000 \ -Dsonar.login=YOUR_SONARQUBE_PROJECT_TOKEN
-
Access the result on http://localhost:9000/