Android unable to run sonar even sonar.gradle.skipCompile is set to true

Must-share information (formatted with Markdown):

  • I am currently using org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.4.1.3373, my project is using java 17, gradle 8.2
  • Get a successful build
  • I am currently using org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.4.1.3373, my project is using java 17.
    But when I am trying to run the sonar gradle task it will fail with the error message “Could not resolve all files for configuration ‘:xx:xxDevDebugUnitTestCompileClasspath’.”, I’ve tried looking for xxDevDebugUnitTestCompileClasspath but it’s not available.

I’ve tried ignoring the test by adding -x test into the command it’s not working, other than that I’ve tried to assemble first before running sonar is also not working

Hi,

Is this error happening in the build that analysis triggers? Can you, as you’ve mentioned, build first, then analyze with -Dsonar.gradle.skipCompile=true on the analysis command line to skip the build that analysis with SonarScanner for Gradle triggers?

 
Ann

The error I am having is actually related to missingDimensionStrategy for our main project. After I adding this then it’s fine already. Thanks for the help!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.