add versions plugin

This commit is contained in:
InsanusMokrassar committed 2023-06-27 16:46:45 +06:00
1 parent 2ddfffa6a9
commit bd2b5ae5fc
3 files changed
+20

No files matched your search

+11
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)
}
}