I am using:
...and I want to force the project build of Android app before passing SonarQube, maybe modifying gradle configuration file.
I have added the next lines to build.gradle
file:
apply plugin: "sonar-runner"
sonarRunner {
sonarProperties {
property "sonar.host.url", "http://localhost:9000"
property "sonar.analysis.mode", "incremental"
property 'sonar.sourceEncoding', 'UTF-8'
property 'sonar.language', 'java'
property "sonar.sources", "src/main"
property 'sonar.profile', 'Android Lint'
property 'sonar.import_unknown_files', 'true'
}
}
subprojects {
sonarRunner {
sonarProperties {
property "sonar.sources", "src/main"
}
}
}
What should I change in order to achieve the desired behaviour?
Simply add a new line to module build.gradle
file, just after sonarRunner task declaration:
sonarRunner {
tasks.sonarRunner.dependsOn build // <- This new line
sonarProperties {