gradle+sonarqube方式
1、配置build.gradle文件的jacoco
apply plugin: ‘jacoco‘ jacoco { toolVersion = "0.8.5" reportsDir = file("$buildDir/customJacocoReportDir") } jacocoTestReport { reports { xml.enabled true csv.enabled false xml.destination file("${buildDir}/jacoco.xml") html.destination file("${buildDir}/jacocoHtml") } }
2、配置build.gradle文件的sonarqube
apply plugin: "org.sonarqube" version "2.6.1" sonarqube { properties { property "sonar.projectName", "FlyCloud" property "sonar.projectKey", "FlyCloud" property "sonar.sourceEncoding", "UTF-8" property "sonar.projectVersion", "1.0-SNAPSHOT" property "sonar.modules", "java-module" // property "javascript-module.sonar.language", "js" property "java-module.sonar.language", "java" // property "sonar.test.exclusions", "**/*" } }
3、在终端执行gradle build命令对程序进行构建。
4、在终端执行gradle sonarqube命令,执行完之后在sonar客户端即可看到代码的覆盖率信息。
相关推荐
静水楼台 2019-07-01
sakurayz 2020-06-16
yuanyuan 2020-06-14
yuanyuan 2020-06-14
hevenue 2020-06-04
yieryi 2020-06-02
yuanyuan 2020-05-17
huaqiangli 2020-05-14
yangliuhbhd 2020-05-11
一片荷叶 2020-05-09
静水楼台 2020-05-09
huaqiangli 2020-04-27
yieryi 2020-04-10
郭宇 2020-02-14
xiaodaiwang 2020-02-02
xiaodaiwang 2020-01-09
leonranri 2019-12-16
xiaodaiwang 2019-11-02
chwnpp 2018-01-05
冯冯领队 2019-10-27
sakurayz 2019-10-24
arnodzl 2019-07-31
sakurayz 2019-04-05
BigBirds 2019-09-12
huaqiangli 2019-08-05
wesaylove 2017-06-19
静水楼台 2019-07-24
mydownloador 2019-07-24
BORISHOU 2019-07-23
yuanyuan 2016-11-25
sakurayz 2015-07-25
骑苍蝇过大海 2015-06-19
BigBirds 2019-06-28
sakurayz 2019-06-28