Gradle Scanner Not Picking Up junit or lint

Using Gradle Scanner Plugin, mostly Kotlin code base.

I’m able to generate reports and PR Decorations, but I’m seeing a significant number of errors in the console logs, e.g.:

Unable to import Android Lint report file(s):

My build.gradle.kts has the lint param set as:
property("sonar.androidLint.reportPaths", "[someOtherPath]/lint-results.debug.xml")

It seems there may be more than one of these lint xmls. We have a rather large codebase. Do I need to hard code the paths for each of them in the sonar.androidLint.reportPaths field?

I was hoping the Sonar Scanner Gradle plugin could auto-magic its way through some of this.

I have a similar question for the sonar.junit.reportPaths. I’m not providing any parameter for sonar.junit.reportPaths currently. I thought the gradle scanner plugin was supposed to take care of that. But I’m seeing errors for that too:

Resource not found:
com.[somePackage] under 
while reading test reports. Please, make sure your "sonar.junit.reportPaths" property is configured properly

Any idea what the issue might be? Do I need to provide a sonar.junit.reportPaths property?

Is there a way to get faster support for Enterprise accounts?


It’s not clear to me whether you have a property set per module or not, but per the docs, the property is expecting

Comma-delimited list of paths to AndroidLint reports

Similarly, the JUnit parameter is also expecting a comma-delimited list.

Professional support is available for commercial editions, and included with larger Enterprise subscriptions.


The reports I’m seeing appear to be reasonable. I can go to a non-trivial effort to gather all of the junit and androidLint paths and add them in, but I’m wondering if there is a quick way to determine whether or not the reports are missing information about them.

That is, if the log says: Resource not found: com.[somePackage] ... while reading test reports. Please, make sure your "sonar.junit.reportPaths" property is configured properly, is there a way to look at the resulting SonarQube report and determine if it’s missing important information?

Same question with the Unable to import Android Lint report file(s): /[somePath]/lint-results-debug.xml. Is there a way to look at the SonarQube reports and see whether or not this is an issue that needs to be addressed?

And if we decide that we don’t need to address these warnings, is there a good way to silence the warnings so they don’t add noise to the logs?


Actually… what’s the context for that error? Now that I’m looking more closely, are you getting that during the processing of the JUnit report? Because this may be about analysis not finding the files mentioned in the report. TBH, we haven’t put much effort into execution reports for quite some time. We really believe that test execution is something that should be handled at the CI side (I.E. if the tests aren’t passing, fail the build; don’t move on to analysis.)

You’re asking how to know what’s missing? :smiley:

The only way to know is to be expecting something that doesn’t show up.

Sorry, no.