SoftwareComponent does not handle configuration hierarchys correctly

(Hampus Wingren) #1

Using the SoftwareComponent concept breaks when you are using your own configurations with Ivy as the configuration hierarchy is not reflected in the Ivy file. The default configuration seems to extend all other configurations and any custom hierarchys are discarded.

Regards, Hampus

(Peter Niederwieser) #2

It’s not clear to me what the problem is. Can you elaborate and give a concrete example?

(Justin Ryan) #3

We had the same issue with the existing components (JavaComponent and WebComponent). We wanted to be able to model multiple configurations and have them all realized correctly in the ivy file. We got around by writing a CustomComponent that could handle more elaborate Usages. The docs aren’t the best, but we use it all the time:

(Hampus Wingren) #4


I think it´s easier if you just take a look at the snippet that causes the problem: org.gradle.api.publish.ivy.internal.publication.DefaultIvyPublication.from(SoftwareComponent)

The code iterates the configurations provided by the component but it does not mirror the extendsFrom attribute, it sets all the configurations to be extended by the default configuration.

(Hampus Wingren) #5

Just wondering if this has made it to some kind of release?

Regards, Hampus