File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66// - sonatypePassword: Maven Central credential used by Nexus publishing.
77
88plugins {
9+ // https://github.com/ben-manes/gradle-versions-plugin/releases
10+ id(" com.github.ben-manes.versions" ) version " 0.51.0"
911 // https://github.com/spotbugs/spotbugs-gradle-plugin/releases
1012 id(" com.github.spotbugs" ) version " 5.0.14" apply false
1113 // https://github.com/gradle-nexus/publish-plugin/releases
@@ -96,6 +98,19 @@ allprojects {
9698 }
9799}
98100
101+ // Exclude pre-release versions from dependencyUpdates task
102+ fun isNonStable (version : String ): Boolean {
103+ val stableKeyword = listOf (" RELEASE" , " FINAL" , " GA" ).any { version.uppercase().contains(it) }
104+ val regex = " ^[0-9,.v-]+(-r)?$" .toRegex()
105+ val isStable = stableKeyword || regex.matches(version)
106+ return isStable.not ()
107+ }
108+ tasks.withType< com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask > {
109+ rejectVersionIf {
110+ isNonStable(candidate.version)
111+ }
112+ }
113+
99114tasks.wrapper {
100115 distributionType = Wrapper .DistributionType .ALL
101116}
You can’t perform that action at this time.
0 commit comments