How do I specify extra properties for Ivy dependencies?

(Gordon Tyler) #1

My Ivy repository uses an extra “branch” property to separate modules. The ivy.xml path pattern is: ‘[organisation]/[module]/([branch]/)[revision]/ivy.xml’

How would I specify the branch when declaring a dependency in my gradle project?

I’ve already tried:

dependencies {
 compile group: "acme", name: "widget", branch: "trunk", version: "latest.integration", configuration: "foobar"

(Peter Niederwieser) #2

As far as I know, setting Ivy extra properties for dependencies is not supported. Perhaps you could solve this by conditionally configuring the Ivy pattern based on what the current branch is.

(Gordon Tyler) #3

Each dependency may need to reference a different branch.

I found at least three issues in JIRA for this:

So there’s definitely a need for it.

Ivy Extra info support when dependency resolve
(Peter Niederwieser) #4

The best you can currently do is to define one repo per branch.