diff --git a/build.gradle b/build.gradle index e1e714763..e6c42b396 100644 --- a/build.gradle +++ b/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 } \ No newline at end of file