Ivy-publish: Use custom configuration for dependency


(Thomas) #1

I am using different configurations to handle dependencies for different database backends:

configurations {
    mysql
    postgresql
}

Using these configurations I declare different dependencies:

dependencies {
    mysql project(path: ':db', configuration: 'mysql')
    postgresql project(path: ':db', configuration: 'postgresql')
}

But if I do that the generated ivy.xml file doesn’t contain any dependencies anymore. If I use e.g. runtime instead of mysql I get a dependency having conf=“runtime->mysql”. I did some researches and it seems that custom configurations are not included as dependencies in generated ivy.xml but I couldn’t really find a convenient solution for that.

I would like to have conf=“mysql->mysql” without changing the generated ivy.xml using withXml. Is this possible?