Jessitron
Jessitron

Reputation: 1420

How can we publish an artifact to a local Ivy repository in Gradle?

In Gradle, we have configured a local maven repository, and artifacts are uploaded there for use in my local builds of other projects.

I'd prefer to use an Ivy repository (so I can have a custom pattern for artifact names).

How do you configure Gradle to upload to a local Ivy repository?

Upvotes: 4

Views: 3097

Answers (1)

rodion
rodion

Reputation: 15029

Try this (based on this and the API):

uploadArchives {
    repositories {
        ivy {
            ivyPattern "/home/robin/.ivy2/local/[organisation]/[module]/[revision]/ivys/[artifact](-[classifier]).[ext]"
            artifactPattern "/home/robin/.ivy2/local/[organisation]/[module]/[revision]/[ext]s/[artifact](-[classifier]).[ext]"
        }
    }
}

(replacing those patterns with your real ivy/artifact patterns).

Upvotes: 7

Related Questions