Skip to content

Commit

Permalink
chore(deps): improve version update check
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli committed Nov 17, 2021
1 parent ebbbb10 commit a3943f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ buildscript {
classpath "net.ltgt.gradle:gradle-errorprone-plugin:$errorPronePluginVersion"
classpath "io.github.gradle-nexus:publish-plugin:$nexusPublishPluginVersion"
classpath "com.adarshr:gradle-test-logger-plugin:$testLoggerPluginVersion"
classpath "se.ascp.gradle:gradle-versions-filter:$versionsFilterPluginVersion"
}
}

Expand Down
15 changes: 4 additions & 11 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,11 @@
*/

apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'se.ascp.gradle.gradle-versions-filter'

dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'ea'].any {
qualifier -> return selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
versionsFilter {
exclusiveQualifiers = ['alpha', 'beta', 'rc', 'cr', 'm', 'ea']
log = false
}

task deps {
Expand Down

0 comments on commit a3943f2

Please sign in to comment.