Skip to content

Commit a5503d2

Browse files
committed
Try different method for not publishing shadowJar
See GradleUp/shadow#586 and GradleUp/shadow#651.
1 parent 2b936e8 commit a5503d2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ shadowJar {
5454
}
5555
}
5656

57+
// Don't publish the shadowJar to Maven Central. Code from:
58+
// https://github.com/johnrengelman/shadow/issues/586#issuecomment-708375599
59+
// https://github.com/johnrengelman/shadow/issues/651#issuecomment-815921124
60+
components.java.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
61+
skip()
62+
}
63+
5764
processResources {
5865
inputs.property("project.version", project.version)
5966
filesMatching("de/tla2b/build.properties") {
@@ -77,8 +84,6 @@ publishing {
7784
publications {
7885
mavenJava(MavenPublication) {
7986
from components.java
80-
// Don't publish the shadowJar to Maven Central
81-
artifacts = artifacts.findAll {it.classifier != "all"}
8287

8388
pom {
8489
name = 'TLA+ to B-AST'

0 commit comments

Comments
 (0)