Add dependencies to pom output

This commit is contained in:
Zontreck 2023-10-15 06:22:19 -07:00
parent f784065b88
commit 0161fef673

View file

@ -71,6 +71,19 @@ publishing {
mavenJava(MavenPublication) {
artifact sourcesJar
artifact jar
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.compile.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
repositories {