61 lines
1.2 KiB
Groovy
61 lines
1.2 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'jacoco'
|
|
id 'application'
|
|
}
|
|
|
|
group = 'hhn.temp.project'
|
|
version = '1.0-SNAPSHOT'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation platform('org.junit:junit-bom:5.10.0')
|
|
testImplementation 'org.junit.jupiter:junit-jupiter'
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
implementation 'com.mysql:mysql-connector-j:9.5.0'
|
|
}
|
|
|
|
jacoco {
|
|
toolVersion = '0.8.13'
|
|
reportsDirectory.set(layout.buildDirectory.dir('customJacocoReportDir'))
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDir("src")
|
|
}
|
|
}
|
|
test {
|
|
java {
|
|
srcDir("test")
|
|
}
|
|
}
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events "passed", "skipped", "failed"
|
|
exceptionFormat "full"
|
|
showStandardStreams = true
|
|
}
|
|
finalizedBy jacocoTestReport
|
|
}
|
|
jacocoTestReport {
|
|
dependsOn test
|
|
reports {
|
|
xml.required = false
|
|
csv.required = false
|
|
html.outputLocation.set(layout.buildDirectory.dir('jacocoHtml'))
|
|
}
|
|
}
|
|
jacocoTestCoverageVerification {
|
|
dependsOn test
|
|
}
|
|
application {
|
|
mainClass = "hhn.temp.project.Main"
|
|
} |