Configure dependencyUpdates to detect stable versions only
This commit is contained in:
parent
49a6742eb7
commit
52085af6d1
1 changed files with 13 additions and 0 deletions
13
build.gradle
13
build.gradle
|
@ -23,6 +23,19 @@ buildscript {
|
|||
plugins {
|
||||
id "com.github.ben-manes.versions" version "0.42.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)
|
||||
}
|
||||
|
||||
tasks.named("dependencyUpdates").configure {
|
||||
rejectVersionIf {
|
||||
isNonStable(it.candidate.version)
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue