Skip to content

SonarQube

Thomas Amberg edited this page Nov 23, 2020 · 29 revisions

Installing the SonarQube service

Installing a local instance of the SonarQube service.

Getting a new SonarQube project token

  • ...

Adding SonarQube to your Android project

  • Open your Android project

  • Open the build.gradle file

  • After the buildscript { ... } block, add

    plugins {
        id "org.sonarqube" version "2.7"
    }
    

Running SonarQube with your token

  • 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/

Clone this wiki locally