SED_Ex6_gk1623/build.gradle

65 lines
1.2 KiB
Groovy

apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
group = 'uk.ac.ic.doc'
version = '1.0.0'
description = """Weather Exercise"""
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenCentral()
}
dependencies {
testImplementation group: 'junit', name: 'junit', version:'4.12'
testImplementation group: 'org.jmock', name: 'jmock-junit4', version: '2.8.3'
testImplementation group: 'org.hamcrest', name: 'hamcrest-all', version:'1.3'
implementation(files('lib/weather.jar'))
}
test {
testLogging {
events "PASSED", "FAILED", "SKIPPED"
}
}
checkstyle {
toolVersion = '8.45.1'
configFile rootProject.file('config/checkstyle/checkstyle.xml')
maxErrors = 0
maxWarnings = 0
}
jacoco {
toolVersion = '0.8.12'
}
jacocoTestReport {
reports {
html.destination file("${buildDir}/reports/coverage")
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.8
}
}
}
}
check.dependsOn jacocoTestCoverageVerification