I am using shadowJar in my java project. I would like to push the outcome into artifactory.
My gradle script look like this, I am not sure how to connect the dots:>
It's a bit late, but I'd like to show you how I got it to work. Maybe it helps someone stumbling across this question as I did:
build.gradle.kts:
plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "5.1.0"
}
publishing {
publications {
create("maven") {
from(components["java"])
artifact(tasks["shadowJar"])
}
}
repositories {
maven {
/* ... */
}
}
}
The example above is written in Kotlin, if you prefer Groovy, you would need to write this instead:
build.gradle:
publishing {
publications {
shadow(MavenPublication) {
from components.java
artifact shadowJar
}
}
}
(found it here: https://libraries.io/github/johnrengelman/shadow)