我正在使用 Jacoco v0.8.4和 Sonarcube v2.7.1。我正在为 SonarCube 使用以下配置。property "sonar.sources", "src/main/java"property "sonar.binaries","build/intermediates/javac,app/build/tmp/kotlin-classes"property "sonar.java.binaries", "build/intermediates/javac,app/build/tmp/kotlin-classes"property "sonar.tests", "src/test/java" // where the tests are locatedproperty "sonar.java.test.binaries", "build/intermediates/javac,app/build/tmp/kotlin-classes"property "sonar.jacoco.reportPath", "build/jacoco/testDevDebugUnitTest.exec"property "sonar.java.coveragePlugin", "jacoco"property "sonar.android.lint.report", "build/reports/lint results.xml"
SonarCube 分析失败,原因是sonar.java.binaries的值无效> No files nor directories matching 'app/build/tmp/kotlin-classes'
但是我的项目文件夹中存在“app/build/tmp/kotlin-classes” 。但是,如果我kotlin从属性中删除内容,那么它会成功地覆盖 Java 文件。我对 Kotlin 的报道做错了什么吗?
1 回答
森栏
TA贡献1810条经验 获得超5个赞
您还需要在下面的路径中添加构建变体文件夹
property "sonar.java.test.binaries", "build/intermediates/classes/test/, app/build/tmp/kotlin-classes/<BuildVariant>UnitTest"
property "sonar.java.binaries", "build/intermediates/classes/<BuildVariant>/, app/build/tmp/kotlin-classes/<BuildVariant>/"
property "sonar.binaries", "build/intermediates/classes/<BuildVariant>/, app/build/tmp/kotlin-classes/<BuildVariant>/"
还有一件事尽量避免使用带有空格的文件名lint results.xml
添加回答
举报
0/150
提交
取消