sonarqube gradle plugin excluding jacoco integration tests

前端 未结 2 1432
醉酒成梦
醉酒成梦 2021-02-08 22:47

I\'m trying to integrate the sonarqube gradle plugin with the jacoco plugin:

classpath \'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.1\'

apply plugi

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-08 23:33

    I'm not really sure, whether this will work for Gradle plugun, but you may try.

    Sonar has a property to specify the name of the integration tests JaCoCo report. This property is called sonar.jacoco.itReportPath (sonar.jacoco.reportPath for unit tests report).

    And as far as I know, gradle sonar plugin let you add custom properties to it. So you can change IT report name via properties as follows:

    sonarqube {
        properties {
            property "sonar.jacoco.itReportPath", "build/jacoco/ integrationTest.exec"
        }
    }
    

提交回复
热议问题