mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 14:07:05 +05:30
build: configure versions plugin
This commit is contained in:
parent
d295459728
commit
31ae513a39
1 changed files with 18 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
||||
|
||||
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
maven {
|
||||
|
@ -16,6 +18,22 @@ plugins {
|
|||
alias(libs.plugins.vcu)
|
||||
}
|
||||
|
||||
fun isNonStable(version: String): Boolean {
|
||||
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) }
|
||||
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
|
||||
val isStable = stableKeyword || regex.matches(version)
|
||||
return isStable.not()
|
||||
}
|
||||
|
||||
tasks.withType<DependencyUpdatesTask>().configureEach {
|
||||
rejectVersionIf { isNonStable(candidate.version) && !isNonStable(currentVersion) }
|
||||
checkForGradleUpdate = false
|
||||
checkBuildEnvironmentConstraints = true
|
||||
outputFormatter = "json"
|
||||
outputDir = "build/dependencyUpdates"
|
||||
reportfileName = "report"
|
||||
}
|
||||
|
||||
group = "dev.msfjarvis.claw"
|
||||
|
||||
version = "1.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue