Defining an artifact name explicitly when publishing with Gradle

90 Views Asked by At

I'm trying to publish to the local repository but to set the artifact name explicitly. For example, say the org is "quick.fox" and the module is "core" with version being 1.1.

What I get is:

<repo>/quick.fox/core/1.1/core-1.1.jar

What I'd like it to be:

<repo>/quick.fox/core/1.1/prefix-core.jar

a basic sample code would be:

apply plugin: 'maven-publish'

publishing {
  publications {
    maven(MavenPublication) {
      group = "quick.fox"
      artifactId = "core"
      version = "1.1"
    }
  }
}

How would I do that? I'm using Gradle 6.5.1, and I am open to using either the maven or ivy publish plugins.

0

There are 0 best solutions below