libpaqle/build.gradle

77 lines
1.6 KiB
Groovy
Raw Normal View History

2019-11-29 08:05:33 +00:00
apply plugin: "java-library"
2019-08-23 13:19:51 +00:00
apply plugin: "groovy"
apply plugin: 'jacoco'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation("org.slf4j:slf4j-api:${slf4jVersion}")
2021-12-11 19:19:01 +00:00
api('com.google.code.gson:gson:2.8.9')
api('com.squareup.okhttp3:okhttp:4.9.3')
2019-08-23 13:19:51 +00:00
testImplementation("org.slf4j:slf4j-simple:${slf4jVersion}")
2021-12-11 19:19:01 +00:00
testImplementation('com.squareup.okhttp3:mockwebserver:4.9.3')
testImplementation("org.codehaus.groovy:groovy-all:${groovyVersion}")
testImplementation("org.spockframework:spock-core:${spockVersion}") {
2019-08-23 13:19:51 +00:00
exclude group: "org.codehaus.groovy"
}
2021-12-11 19:19:01 +00:00
testImplementation('com.athaydes:spock-reports:2.1.1-groovy-3.0') {
2019-08-23 13:19:51 +00:00
transitive = false // this avoids affecting your version of Groovy/Spock
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
mavenLocal()
}
}
jacoco {
2021-12-11 19:19:01 +00:00
toolVersion = "0.8.7"
2019-08-23 13:19:51 +00:00
}
jacocoTestReport {
group = "verification"
reports {
2021-12-11 19:19:01 +00:00
xml.required = false
csv.required = false
2019-08-23 13:19:51 +00:00
html.destination file("${buildDir}/reports/coverage")
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: 'biz/nellemann/libpaqle/pojo/**')
}))
}
}
test.finalizedBy jacocoTestReport
jacocoTestCoverageVerification {
violationRules {
rule {
element = 'CLASS'
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.7
}
excludes = [
'biz.nellemann.libpaqle.pojo.*'
]
}
}
}
check.dependsOn jacocoTestCoverageVerification