Skip to content

Commit

Permalink
README: Update rejectVersionIf from examples/groovy/build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Michel Fayard committed Sep 10, 2019
1 parent 5f89fa2 commit 69c4289
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@ You can either use the simplified syntax `rejectVersionIf { ... }` or configure

```groovy
dependencyUpdates {
// Example 1: reject all non stable versions
rejectVersionIf { selection ->
isNonStable(selection.candidate.version)
}
// Example 1: reject all non stable versions
rejectVersionIf {
isNonStable(candidate.version)
}
// Example 2: disallow release candidates as upgradable versions from stable versions
rejectVersionIf { selection ->
isNonStable(selection.candidate.version) && !isNonStable(selection.currentVersion)
}
// Example 2: disallow release candidates as upgradable versions from stable versions
rejectVersionIf {
isNonStable(candidate.version) && !isNonStable(currentVersion)
}
// Example 3: using the full syntax
// Example 3: using the full syntax
resolutionStrategy {
componentSelection {
all {
Expand Down

0 comments on commit 69c4289

Please sign in to comment.