libcvrapi/build.gradle

107 lines
2.4 KiB
Groovy
Raw Normal View History

2019-08-17 17:53:11 +00:00
buildscript {
repositories {
jcenter()
}
dependencies {
2019-08-19 08:00:01 +00:00
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
2019-10-25 14:45:17 +00:00
//classpath 'com.bmuschko:gradle-clover-plugin:2.2.3'
2019-08-17 17:53:11 +00:00
}
}
apply plugin: "idea"
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-19 08:00:01 +00:00
apply plugin: 'maven'
2019-08-23 06:18:13 +00:00
apply plugin: 'jacoco'
2019-08-17 17:53:11 +00:00
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
2019-08-23 06:18:13 +00:00
//apply from: "${project.projectDir}/gradle/clover.gradle"
sourceCompatibility = 1.8
targetCompatibility = 1.8
2019-08-17 17:53:11 +00:00
repositories {
mavenCentral()
}
dependencies {
2019-08-19 08:49:53 +00:00
2021-01-21 20:21:31 +00:00
implementation("org.slf4j:slf4j-api:${slf4jVersion}")
2019-10-25 14:45:17 +00:00
api("com.google.code.gson:gson:2.8.5")
api("com.squareup.okhttp3:okhttp:4.1.0")
2019-08-19 08:49:53 +00:00
2019-08-23 06:18:13 +00:00
testImplementation('com.squareup.okhttp3:mockwebserver:4.1.0')
2021-01-21 20:21:31 +00:00
testRuntime("org.slf4j:slf4j-simple:${slf4jVersion}")
2019-08-23 06:18:13 +00:00
testCompile("org.codehaus.groovy:groovy-all:${groovyVersion}")
2019-08-17 17:53:11 +00:00
testCompile("org.spockframework:spock-core:${spockVersion}") {
exclude group: "org.codehaus.groovy"
}
2019-08-19 08:49:53 +00:00
testCompile( 'com.athaydes:spock-reports:1.6.2' ) {
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 {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
mavenLocal()
}
}
2019-08-17 17:53:11 +00:00
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
2019-10-25 15:37:21 +00:00
override = true
2019-08-17 17:53:11 +00:00
configurations = ['archives']
pkg {
repo = "libs"
2019-10-25 15:37:21 +00:00
name = "libcvrapi"
2019-08-17 17:53:11 +00:00
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = licenses
publish = true
}
}
2019-08-23 06:18:13 +00:00
jacoco {
toolVersion = "0.8.4"
}
jacocoTestReport {
group = "verification"
2019-10-25 14:45:17 +00:00
reports {
xml.enabled false
csv.enabled false
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'
minimum = 0.7
}
excludes = [
'biz.nellemann.libcvrapi.pojo.*'
]
}
}
2019-08-23 06:18:13 +00:00
}
check.dependsOn jacocoTestCoverageVerification