Skip to content
Snippets Groups Projects
Commit d1300cac authored by Chen Liang's avatar Chen Liang
Browse files

Update build.gradle

parent b074d19a
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ plugins {
id 'java'
id 'org.springframework.boot' version '3.3.5'
id 'io.spring.dependency-management' version '1.1.6'
id 'jacoco'
id 'jacoco' // 引入 JaCoCo 插件
}
group = 'com.cardiff.client_project'
......@@ -44,24 +44,11 @@ dependencies {
testImplementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '4.1.0'
}
tasks.named('test') {
useJUnitPlatform()
}
jacoco {
toolVersion = '0.8.7'
// 确保不会重复创建任务
tasks.named('jacocoTestReport').configure {
// 任务配置
}
task jacocoTestReport(type: JacocoReport) {
dependsOn test
reports {
xml.enabled true
html.enabled true
}
sourceDirectories = files("src/main/java")
classDirectories = files("build/classes/java/main")
executionData = files("build/jacoco/test.exec")
tasks.named('test') {
useJUnitPlatform()
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment