We run the sonarqube task from gradle but it cannot find the jacoco coverage report even though the XML file has already been generated.
Here is log:
No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths='build/reports/coverage/coverage.xml,app/build/reports/coverage/coverage.xml,**/reports/coverage/coverage.xml,reports/coverage/coverage.xml'. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
The jacoco xml report file has been generated under build folder
$ echo $(ls app/build/reports/coverage)
Welcome to the community!
Where do you run analysis from? What are the subdirectories analysis “sees”?
I use GitLab CI to run the analysis for android project. You can see the build folder structure has been created as following:
I actually meant to ask what directory analysis is executed from. Could you add
-Dsonar.log.level=DEBUG to your command line and post your analysis log?
I already found the problem and get it work already. Thank you for your support.
I’m glad you worked through this. Did you learn anything that might help others in the future?