Removed jacoco.

Added isNonStable function for versions plugin.
This commit is contained in:
Erik C. Thauvin 2021-11-28 23:30:58 -08:00
parent 54e6e6dd87
commit db1a1a9474

View file

@ -2,8 +2,7 @@ plugins {
id 'application'
id 'com.github.ben-manes.versions' version '0.39.0'
id 'idea'
id 'io.gitlab.arturbosch.detekt' version '1.19.0-RC1'
id 'jacoco'
id 'io.gitlab.arturbosch.detekt' version '1.19.0-RC2'
id 'java'
id 'net.thauvin.erik.gradle.semver' version '1.0.4'
id 'org.jetbrains.kotlin.jvm' version '1.6.0'
@ -19,11 +18,17 @@ final def packageName = 'net.thauvin.erik.mobibot'
final def deployDir = 'deploy'
final def semverProcessor = "net.thauvin.erik:semver:1.2.0"
def isNonStable = { String version ->
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}
mainClassName = packageName + '.Mobibot'
ext.versions = [
log4j: '2.14.1',
pmd : '6.40.0',
pmd : '6.41.0',
]
repositories {
@ -46,7 +51,7 @@ dependencies {
implementation 'com.google.guava:guava:31.0.1-jre'
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0-RC'
implementation "org.apache.logging.log4j:log4j-api:$versions.log4j"
implementation "org.apache.logging.log4j:log4j-core:$versions.log4j"
@ -56,7 +61,7 @@ dependencies {
implementation 'commons-net:commons-net:3.8.0'
implementation 'com.rometools:rome:1.16.0'
implementation 'com.squareup.okhttp3:okhttp:4.9.2'
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
implementation 'net.aksingh:owm-japis:2.5.3.0'
implementation 'com.google.code.gson:gson:2.8.9'
@ -113,6 +118,12 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
}
}
tasks.named("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(it.candidate.version)
}
}
pmd {
toolVersion = versions.pmd
ignoreFailures = true
@ -162,18 +173,6 @@ sonarqube {
}
}
jacoco {
toolVersion = '0.8.7'
}
jacocoTestReport {
dependsOn test
reports {
html.required = true
xml.required = true
}
}
tasks.sonarqube {
dependsOn 'koverReport'
}