I'm stuck trying to get a sonar report to run with an Android gradle project. Since most of the important sonar properties are only applied by the sonarRunner gradle plugin when the project is a java project, I am having problems applying them to the com.android.application project.
This is my sonarRunner configuration:
sonarRunner { sonarProperties { property "sonar.sourceEncoding", "UTF-8" property "sonar.profile", "Android Lint" property "sonar.sources", android.sourceSets.main.java.srcDirs property "sonar.binaries", file("${project.buildDir}/intermediates/classes/app") property "sonar.libraries", "" // what to put here? } }
The problem is that the sonar complains that the classes were not found, because libraries cannot be referenced.
How can I reference android dependencies + libraries in my sonarRunner configuration?
Example Error Output:
INFO - Load batch settings INFO - User cache: C:\Users\mannaz\.sonar\cache INFO - Install plugins INFO - Install JDBC driver INFO - Create JDBC datasource for jdbc:postgresql://sonar.local/sonar?useUnicode=true&characterEncoding=utf8 INFO - Initializing Hibernate INFO - Load project settings INFO - Apply project exclusions WARN - 'sonar.dynamicAnalysis' is deprecated since version 4.3 and should no longer be used. INFO -
source share