4

I have a multi module gradle java project analyzed with sonarqube.

I need to skip sonarqube analysis of one module entirely.

I was not able to find a solution in sonarqube documentation. Closest page is Narrowing The Focus, but it is about skipping files and directories while I'd like to skip entire module. See https://docs.sonarqube.org/display/SONAR/Narrowing+the+Focus

kza
  • 1,590
  • 13
  • 32
  • I can see a maven solution, but I have gradle https://stackoverflow.com/questions/30178581/how-to-skip-a-sub-module-in-a-sonar-analysis-in-a-multi-module-java-project – kza Jun 25 '17 at 13:04
  • how did you setup your build.gradle to make sonarqube scan all modules? i've been trying but can't get it to scan more than one module at a time. thanks – frass Feb 19 '20 at 16:58

1 Answers1

17

You have to set skipProject to true in a project you want to skip:

sonarqube {
    skipProject = true
}

https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Gradle#AnalyzingwithSonarQubeScannerforGradle-Skippinganalysisofaproject

kza
  • 1,590
  • 13
  • 32