I'm struggling to set up correctly SonarQube 5.4 for a multi-module project. I've read here, here and here, all of the provided solutions doesn't solve my errors: I got during a Sonar analyze for every class I created (not for libraries I included) a warning:
"Class XYZ is not accessible through the ClassLoader."
and I get no results in the Sonar dashboard (neither on localhost nor on Jenkins), not even the time of the analyze got updated. I'm using Gradle 2.10, here is my root Gradle file:
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.0-rc1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply from: 'buildsystem/dependencies.gradle'
apply plugin: "org.sonarqube"
subprojects {
sonarqube {
properties {
property "sonar.host.url", "http://localhost:9000/"
property "sonar.sources", "./src/main/java"
property "sonar.java.binaries", "./build/"
property "sonar.projectKey", "net.project"
property "sonar.projectName", "Project Android"
property "sonar.projectVersion", "0.5"
property "sonar.sourceEncoding", "UTF-8"
}
}
}
allprojects {
ext {
androidApplicationId = 'net.project'
androidVersionCode = 1
androidVersionName = "0.5"
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
testApplicationId = 'com.beatclip.android.presentation.test'
}
repositories {
jcenter()
}
}
task wrapper(type: Wrapper) {
description 'Creates the gradle wrapper.'
gradleVersion '2.10'
}
Could be Dagger2 the problem? I have no SonarQube configurations in the Gradle files for the modules set, since this example from SonarQube doesn't provide any Sonar configs in module Gradle files as well.
Any help or example is appreciated! :)