SonarScanner for gradle still depends from java compile?

Hello,

Hi,

I was reviewing the issue SCANGRADLE-124 titled “Remove implicit dependency of the sonar task on the compile tasks.” I expected that there would no longer be a dependency on the JavaCompile task. However, after looking at the code, it seems that while the feature flag sonar.gradle.skipCompile has been removed, the dependency still remains.

Could you please clarify if this is the intended behavior or if there might be an oversight?

Thank you!

Hi,

Welcome to the community!

What version of the scanner are you using? Per the docs,

Starting with v3.0 of the SonarScanner for Gradle, task dependencies are no longer added automatically. Instead, the SonarScanner plugin enforces the correct order of tasks with mustRunAfter . You need to be either manually run the tasks that produce output before sonarqube , or you can add a dependency to the build script

 
Ann