107 lines
2.4 KiB
Groovy
107 lines
2.4 KiB
Groovy
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
|
|
//classpath 'com.bmuschko:gradle-clover-plugin:2.2.3'
|
|
}
|
|
}
|
|
|
|
apply plugin: "idea"
|
|
apply plugin: "java-library"
|
|
apply plugin: "groovy"
|
|
apply plugin: 'maven'
|
|
apply plugin: 'jacoco'
|
|
apply plugin: 'maven-publish'
|
|
apply plugin: 'com.jfrog.bintray'
|
|
//apply from: "${project.projectDir}/gradle/clover.gradle"
|
|
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation("org.slf4j:slf4j-api:${slf4jVersion}")
|
|
api("com.google.code.gson:gson:2.8.5")
|
|
api("com.squareup.okhttp3:okhttp:4.1.0")
|
|
|
|
testImplementation('com.squareup.okhttp3:mockwebserver:4.1.0')
|
|
testRuntime("org.slf4j:slf4j-simple:${slf4jVersion}")
|
|
testCompile("org.codehaus.groovy:groovy-all:${groovyVersion}")
|
|
testCompile("org.spockframework:spock-core:${spockVersion}") {
|
|
exclude group: "org.codehaus.groovy"
|
|
}
|
|
testCompile( 'com.athaydes:spock-reports:1.6.2' ) {
|
|
transitive = false // this avoids affecting your version of Groovy/Spock
|
|
}
|
|
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
}
|
|
}
|
|
repositories {
|
|
mavenLocal()
|
|
}
|
|
}
|
|
|
|
bintray {
|
|
user = System.getenv('BINTRAY_USER')
|
|
key = System.getenv('BINTRAY_KEY')
|
|
|
|
override = true
|
|
configurations = ['archives']
|
|
pkg {
|
|
repo = "libs"
|
|
name = "libcvrapi"
|
|
websiteUrl = siteUrl
|
|
vcsUrl = gitUrl
|
|
licenses = licenses
|
|
publish = true
|
|
}
|
|
}
|
|
|
|
jacoco {
|
|
toolVersion = "0.8.4"
|
|
}
|
|
|
|
jacocoTestReport {
|
|
group = "verification"
|
|
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/**')
|
|
}))
|
|
}
|
|
}
|
|
test.finalizedBy jacocoTestReport
|
|
|
|
jacocoTestCoverageVerification {
|
|
violationRules {
|
|
rule {
|
|
element = 'CLASS'
|
|
limit {
|
|
counter = 'LINE'
|
|
value = 'COVEREDRATIO'
|
|
minimum = 0.7
|
|
}
|
|
excludes = [
|
|
'biz.nellemann.libcvrapi.pojo.*'
|
|
]
|
|
}
|
|
}
|
|
}
|
|
check.dependsOn jacocoTestCoverageVerification
|