4
votes

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?

1

1 Answers

7
votes

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).