From 5cc968e4ebf95b21ec8a095e970f65837f8480f6 Mon Sep 17 00:00:00 2001 From: melontini <104443436+melontini@users.noreply.github.com> Date: Sun, 28 Jul 2024 16:52:23 +0700 Subject: [PATCH] =?UTF-8?q?What=20if=20Gradle=20was=20called=20?= =?UTF-8?q?=F0=9D=93=95=F0=9D=93=BB=F0=9D=93=AE=F0=9D=93=AA=F0=9D=93=B4?= =?UTF-8?q?=F0=9D=94=82=20Build=20Tool=20and=20had=20a=20way=20to=20remove?= =?UTF-8?q?=20dependencies=20from=20publishing=20without=20manually=20modi?= =?UTF-8?q?fying=20the=20pom=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/build.gradle b/build.gradle index 3702040..2e17293 100644 --- a/build.gradle +++ b/build.gradle @@ -229,6 +229,20 @@ publishing { publications { mavenJava(MavenPublication) { from components.java + + pom.withXml { + Node pomNode = asNode() + pomNode.dependencies.dependency.each() { node -> + logger.warn("${node.groupId.text()}") + + [libs.evalx, libs.mapping.io].each { + if(node.groupId.text()?.startsWith(it.get().group) && + node.artifactId.text()?.startsWith(it.get().name)) { + node.parent().remove(node) + } + } + } + } } } -- 2.51.2