Are exclusions transitive?


(Roger Kapsi) #1

I have a multi module project. Let it be A and B, and B depends on A. The A project has some 3rd party dependencies and I had to exclude some of the transitive dependencies. It looks like Gradle is trying to re-resolve these excluded dependencies of project A when it’s attempting to build project B.

The problem is some of these transitive dependencies don’t exist and the build fails. Is it possible to make Gradle honor these exclusions or do I have to redeclare them in project B?


(Szczepan Faber) #2

Yes, the exclusions are transitive.

I suspect the problem is different. Perhaps project A’s dependencies also include some unwanted transitive dependencies that you have excluded in the project B. So the most appropriate solution would be to also declare those exclusions at the project’s A level.

Hope that helps!