From a5503d29d61b14a2fad787e6f2147a5932101356 Mon Sep 17 00:00:00 2001 From: dgelessus Date: Thu, 2 May 2024 17:05:44 +0200 Subject: [PATCH] Try different method for not publishing shadowJar See johnrengelman/shadow#586 and johnrengelman/shadow#651. --- build.gradle | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index fe6050d..431e662 100644 --- a/build.gradle +++ b/build.gradle @@ -54,6 +54,13 @@ shadowJar { } } +// Don't publish the shadowJar to Maven Central. Code from: +// https://github.com/johnrengelman/shadow/issues/586#issuecomment-708375599 +// https://github.com/johnrengelman/shadow/issues/651#issuecomment-815921124 +components.java.withVariantsFromConfiguration(configurations.shadowRuntimeElements) { + skip() +} + processResources { inputs.property("project.version", project.version) filesMatching("de/tla2b/build.properties") { @@ -77,8 +84,6 @@ publishing { publications { mavenJava(MavenPublication) { from components.java - // Don't publish the shadowJar to Maven Central - artifacts = artifacts.findAll {it.classifier != "all"} pom { name = 'TLA+ to B-AST'