Publishing is not yet able to resolve a dependency on a project with multiple different publications


#1

gradle error: > Publishing is not yet able to resolve a dependency on a project with multiple different publications.

Is there a work-around for this I could use? I understand the issue is that one of my dependencies has multiple publications. This is the way my legacy project is setup, so I can’t change that. Is there a way I can tell the publisher what publication of the dependency I want it to use?

I currently define the publication in the dependent project as:

publishing {
    publications {
        java(MavenPublication) {
            from components.java
        }
    }
}

(Peter Niederwieser) #2

The only workaround I’m aware of is to use the old ‘maven’ plugin.


(Allen George) #3

What exactly does this error mean? Specifically, what dependencies is publish trying to resolve?


(Peter Niederwieser) #4

I think it’s complaining that you have a project dependency on a project that declares more than one publication. The workaround is to use the ‘maven’ plugin, instead of the incubating ‘maven-publish’ plugin.