Analyzing Android Project with Lint and SonarQube

I had success with a multimodule android project. Since the complete build files take too much space I show the relevant parts here only.

In the parent project's build.gradle I set:

buildscript {
    ...
    dependencies { classpath 'com.android.tools.build:gradle:1.5.0'
    ...
}
plugins { id "org.sonarqube" version "1.1" }

In the app project (and any other children) I set:

sonarqube {
    properties {
        property "sonar.profile", "Android Lint"
        property "sonar.sources", "./src/main/java"
    }
}

That was the minimum setup for SonarQube plugin to start analyzing the projects.


Your gradle settings seems fine, have you installed Android plugin on SonarQube server.

I don't see that step on your question, if not goto Settings->System->Update Center and install Android plugin.

enter image description here

Once that is installed you need to restart your SonarQube server and rerun sonar-runner.