49 lines
978 B
Groovy
49 lines
978 B
Groovy
plugins {
|
|
id 'java'
|
|
id 'jacoco'
|
|
}
|
|
group = 'hhn.temp.project'
|
|
version = '1.0-SNAPSHOT'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'com.mysql:mysql-connector-j:8.4.0'
|
|
testImplementation platform('org.junit:junit-bom:5.10.0')
|
|
testImplementation 'org.junit.jupiter:junit-jupiter'
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
}
|
|
|
|
jacoco {
|
|
toolVersion = '0.8.13'
|
|
reportsDirectory.set(layout.buildDirectory.dir('customJacocoReportDir'))
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDir("src")
|
|
}
|
|
}
|
|
test {
|
|
java {
|
|
srcDir("test")
|
|
}
|
|
}
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
finalizedBy jacocoTestReport
|
|
}
|
|
jacocoTestReport {
|
|
dependsOn test
|
|
reports {
|
|
xml.required = true
|
|
csv.required = true
|
|
html.outputLocation.set(layout.buildDirectory.dir('jacocoHtml'))
|
|
csv.destination file("${build}/reports/jacoco/jacoco.csv")
|
|
}
|
|
} |