Skip to content

Commit

Permalink
Unset the classifier for shadow projects
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed May 30, 2024
1 parent 983683f commit 71017d0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ PublishingTools.setupPublications(project) { publication ->
// This assumes that the shadow plugin is enabled, rather than using the vanilla java component.

// Inlines the shadow.component call, which doesn't actually use components, and doesn't generate
// the pom late enough to pick up gradle's own artifactId wiring from our archivesBaseName changes
// the pom late enough to pick up gradle's own artifactId wiring from our archivesBaseName changes.
// Also un-sets the classifier for the shadow jar, since we want this to be the default artifact
// project.shadow.component(publication)
publication.artifact(project.tasks.named("shadowJar"))
publication.artifact(source: project.tasks.named("shadowJar"), classifier: '')
publication.pom {
withXml {
def root = asNode()
Expand Down

0 comments on commit 71017d0

Please sign in to comment.