libcvrapi/build.gradle

94 lines
2.2 KiB
Groovy
Raw Normal View History

2019-10-25 14:45:17 +00:00
apply plugin: "java-library"
2019-08-17 17:53:11 +00:00
apply plugin: "groovy"
2019-08-23 06:18:13 +00:00
apply plugin: 'jacoco'
2019-08-17 17:53:11 +00:00
apply plugin: 'maven-publish'
2019-08-23 06:18:13 +00:00
2019-08-17 17:53:11 +00:00
repositories {
mavenCentral()
}
dependencies {
2019-08-19 08:49:53 +00:00
implementation("org.slf4j:slf4j-api:${slf4jVersion}")
2023-01-03 12:59:00 +00:00
implementation("com.google.code.gson:gson:2.10")
implementation("com.squareup.okhttp3:okhttp:4.10.0")
2019-08-19 08:49:53 +00:00
2019-08-23 06:18:13 +00:00
testImplementation("org.slf4j:slf4j-simple:${slf4jVersion}")
2023-01-03 13:58:07 +00:00
testImplementation("com.squareup.okhttp3:mockwebserver:4.10.0")
2021-12-11 19:17:52 +00:00
testImplementation("org.codehaus.groovy:groovy-all:${groovyVersion}")
testImplementation("org.spockframework:spock-core:${spockVersion}") {
2019-08-17 17:53:11 +00:00
exclude group: "org.codehaus.groovy"
}
2023-01-03 12:59:00 +00:00
testImplementation("com.athaydes:spock-reports:2.3.2-groovy-3.0") {
2019-08-19 08:49:53 +00:00
transitive = false // this avoids affecting your version of Groovy/Spock
}
2019-08-17 17:53:11 +00:00
}
2019-08-19 18:58:01 +00:00
publishing {
2023-01-03 13:35:44 +00:00
publications {
2023-01-03 14:12:30 +00:00
maven(MavenPublication) {
groupId = 'biz.nellemann.libs'
2023-01-03 14:17:29 +00:00
artifactId = 'libcvrapi'
2023-01-03 14:12:30 +00:00
2023-01-03 13:35:44 +00:00
from components.java
}
}
repositories {
2023-01-03 12:59:00 +00:00
maven {
name = "gitea"
2023-01-03 13:35:44 +00:00
url = uri("https://git.data.coop/api/packages/$System.env.DRONE_REPO_OWNER/maven")
2023-01-03 12:59:00 +00:00
credentials {
2023-01-03 13:35:44 +00:00
username = "$System.env.DRONE_REPO_OWNER"
password = "$System.env.AUTH_TOKEN"
2023-01-03 12:59:00 +00:00
}
}
mavenLocal()
}
2019-08-19 18:58:01 +00:00
}
2023-01-03 12:59:00 +00:00
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
2021-11-03 14:48:13 +00:00
test {
useJUnitPlatform()
}
2019-08-23 06:18:13 +00:00
jacoco {
2023-01-03 12:59:00 +00:00
toolVersion = "0.8.8"
2019-08-23 06:18:13 +00:00
}
jacocoTestReport {
group = "verification"
2019-10-25 14:45:17 +00:00
reports {
2021-12-11 19:17:52 +00:00
xml.required = false
csv.required = false
2019-10-25 14:45:17 +00:00
html.destination file("${buildDir}/reports/coverage")
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: 'biz/nellemann/libcvrapi/pojo/**')
}))
}
2019-08-23 06:18:13 +00:00
}
test.finalizedBy jacocoTestReport
jacocoTestCoverageVerification {
2019-10-25 14:45:17 +00:00
violationRules {
rule {
element = 'CLASS'
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
2023-01-10 08:48:11 +00:00
minimum = 0.3
2019-10-25 14:45:17 +00:00
}
excludes = [
'biz.nellemann.libcvrapi.pojo.*'
]
}
}
2019-08-23 06:18:13 +00:00
}
check.dependsOn jacocoTestCoverageVerification