From e6b1bb0358a193c3a39a7575d5fba416f934dafd Mon Sep 17 00:00:00 2001 From: tanya-sinha_atko Date: Fri, 20 Sep 2024 15:48:56 +0530 Subject: [PATCH] added pom config --- gradle/maven-publish.gradle | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gradle/maven-publish.gradle b/gradle/maven-publish.gradle index 60474d52..beb5f464 100644 --- a/gradle/maven-publish.gradle +++ b/gradle/maven-publish.gradle @@ -7,7 +7,7 @@ task('sourcesJar', type: Jar, dependsOn: classes) { } task('javadocJar', type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' from javadoc.getDestinationDir() } tasks.withType(Javadoc).configureEach { @@ -37,11 +37,10 @@ publishing { artifactId = POM_ARTIFACT_ID version = getVersionName() + artifact("$buildDir/libs/${project.name}-${version}.jar") artifact sourcesJar artifact javadocJar - from components.java - pom { name = POM_NAME packaging = POM_PACKAGING @@ -69,6 +68,17 @@ publishing { connection = POM_SCM_CONNECTION developerConnection = POM_SCM_DEV_CONNECTION } + + pom.withXml { + def dependenciesNode = asNode().appendNode('dependencies') + + project.configurations.implementation.allDependencies.each { + def dependencyNode = dependenciesNode.appendNode('dependency') + dependencyNode.appendNode('groupId', it.group) + dependencyNode.appendNode('artifactId', it.name) + dependencyNode.appendNode('version', it.version) + } + } } } }