Gradle Plugin and C++

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

SonarQube 8.1

Gradle plugin v2.7

  • what are you trying to achieve

I have a project with Java, C++, and a JNI layer. I’d like to know if it is possible to run both Java and C++ using the gradle plugin instead of the scanner. Or would this need to be gradle for the Java portion, and scanner for the C++ portions?

  • what have you tried so far to achieve this

Read through documentation found here https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-gradle/

Hi @willtoth,

you can use gradle plugin, you should do it in two steps:

  1. run build-wrapper --out-dir build-wrapper-output gradle clean build --no-daemon note that no-daemon is necessary here for the build-wrapper to be able to follow children processes
  2. run gradle sonarqube passing option sonar.cfamily.build-wrapper-output=build-wrapper-output
1 Like