From c5e775ef77aefd3bef4a06229d5d32c5b6614a15 Mon Sep 17 00:00:00 2001 From: Jon Schneider Date: Thu, 12 Nov 2015 15:12:11 -0800 Subject: [PATCH] Guard against trying to apply dependency excludes on transitive deps --- CHANGELOG.md | 5 +++++ .../plugin/publishing/ivy/IvyExcludesPlugin.groovy | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 143722d0..fde360ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +4.4.2 / 2015-11-12 +================== + +* Bugfix to guard against trying to apply dependency excludes on transitive deps + 4.4.1 / 2015-11-04 ================== diff --git a/src/main/groovy/nebula/plugin/publishing/ivy/IvyExcludesPlugin.groovy b/src/main/groovy/nebula/plugin/publishing/ivy/IvyExcludesPlugin.groovy index 19a3161d..4b107c69 100644 --- a/src/main/groovy/nebula/plugin/publishing/ivy/IvyExcludesPlugin.groovy +++ b/src/main/groovy/nebula/plugin/publishing/ivy/IvyExcludesPlugin.groovy @@ -39,12 +39,14 @@ class IvyExcludesPlugin implements Plugin { .findAll { !it.excludeRules.isEmpty() } .each { md -> def dep = dependencies.find { it.@org == md.group && it.@name == md.name } - md.excludeRules.each { rule -> - def exclude = dep.appendNode('exclude') - if (rule.group) - exclude.@org = rule.group - if (rule.module) - exclude.@module = rule.module + if(dep != null) { + md.excludeRules.each { rule -> + def exclude = dep.appendNode('exclude') + if (rule.group) + exclude.@org = rule.group + if (rule.module) + exclude.@module = rule.module + } } } }