Add dependencies to pom output
This commit is contained in:
parent
f784065b88
commit
0161fef673
1 changed files with 13 additions and 0 deletions
13
build.gradle
13
build.gradle
|
@ -71,6 +71,19 @@ publishing {
|
||||||
mavenJava(MavenPublication) {
|
mavenJava(MavenPublication) {
|
||||||
artifact sourcesJar
|
artifact sourcesJar
|
||||||
artifact jar
|
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 {
|
repositories {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue