Skip to content

Commit

Permalink
Generate "exclusions" in POM (#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsideup authored and rnorth committed Jul 10, 2018
1 parent 2918f42 commit bc495a5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ publishing {
appendNode('artifactId', dependency.name)
appendNode('version', dependency.version)
appendNode('scope', scope)

if (dependency instanceof ModuleDependency && !dependency.excludeRules.empty) {
def excludesNode = appendNode('exclusions')
for (rule in dependency.excludeRules) {
excludesNode.appendNode('exclusion').with {
appendNode('groupId', rule.group)
appendNode('artifactId', rule.module)
}
}
}
}
}

Expand Down

0 comments on commit bc495a5

Please sign in to comment.