Assuming I have two dependencies, A and B. A has a dependencies block like this:
dependencies {
implementation ("someOtherDependency") {
exclude module: "some-module"
}
}
and inspecting the gradle dependencies
output of A shows that no dependency of the module “some-module” is present. Same with the generated pom, which has a clear exclude
statement in it for that exclude.
Dependency B now has:
dependencies {
implementation ("A")
}
And looking at the output of gradle dependencies
in dependency B shows that dependencies from some-module
are present, and clearly under the tree of A, even tho they’ve been excluded by A and are present in the pom as excludes. I need to exclude them again manually from B, but this isn’t really feasible to do in my case, since I am distributing A as a library.
What’s the cause of this behaviour, and can I fix it from A’s side?