Skip to content

Commit bc495a5

Browse files
bsideuprnorth
authored andcommitted
Generate "exclusions" in POM (#772)
1 parent 2918f42 commit bc495a5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

gradle/publishing.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ publishing {
5858
appendNode('artifactId', dependency.name)
5959
appendNode('version', dependency.version)
6060
appendNode('scope', scope)
61+
62+
if (dependency instanceof ModuleDependency && !dependency.excludeRules.empty) {
63+
def excludesNode = appendNode('exclusions')
64+
for (rule in dependency.excludeRules) {
65+
excludesNode.appendNode('exclusion').with {
66+
appendNode('groupId', rule.group)
67+
appendNode('artifactId', rule.module)
68+
}
69+
}
70+
}
6171
}
6272
}
6373

0 commit comments

Comments
 (0)