diff --git a/src/main/groovy/com/github/benmanes/gradle/versions/updates/DependencyUpdatesTask.groovy b/src/main/groovy/com/github/benmanes/gradle/versions/updates/DependencyUpdatesTask.groovy index f9a8f7c4..fd33c9f6 100644 --- a/src/main/groovy/com/github/benmanes/gradle/versions/updates/DependencyUpdatesTask.groovy +++ b/src/main/groovy/com/github/benmanes/gradle/versions/updates/DependencyUpdatesTask.groovy @@ -98,7 +98,8 @@ class DependencyUpdatesTask extends DefaultTask { resolutionStrategy { ResolutionStrategyWithCurrent strategy -> strategy.componentSelection { ComponentSelectionRulesWithCurrent selection -> selection.all { ComponentSelectionWithCurrent current -> - if (filter.reject(current)) { + def isNotNull = current.currentVersion != null && current.candidate.version != null + if (isNotNull && filter.reject(current)) { current.reject("Rejected by rejectVersionIf ") } }