add versions plugin

This commit is contained in:
2023-06-27 16:46:45 +06:00
parent 2ddfffa6a9
commit bd2b5ae5fc
3 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
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)
}
tasks.named("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(it.candidate.version)
}
}