Cleanup build files

This commit is contained in:
Syer10
2022-01-30 21:03:53 -05:00
parent d1481734e8
commit 8028198667
2 changed files with 20 additions and 40 deletions

View File

@@ -39,6 +39,12 @@ allprojects {
}
}
tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
rejectVersionIf {
isNonStable(candidate.version) && !isNonStable(currentVersion)
}
}
subprojects {
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile> {
kotlinOptions {
@@ -116,4 +122,17 @@ subprojects {
}
}
}
}
plugins.withType<JacocoPlugin> {
configure<JacocoPluginExtension> {
toolVersion = "0.8.7"
}
}
}
fun isNonStable(version: String): Boolean {
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.contains(it, true) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(version)
return isStable.not()
}