diff --git a/build.gradle b/build.gradle index 1376aa4024..ae31ce38fa 100644 --- a/build.gradle +++ b/build.gradle @@ -945,3 +945,16 @@ tasks.register('copyTestLogs', Copy) { includeEmptyDirs = false } + +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 { + // Reject all non stable versions + rejectVersionIf { + isNonStable(it.candidate.version) + } +}