Is there a way in gradle to remove a dependency from a parent source set, with the goal to replace with another variant of the same library?
h
hfhbd
09/14/2022, 6:05 PM
What about
exclude
?
j
Jeff Lockhart
09/14/2022, 6:08 PM
My understanding of
exclude
is to be able to exclude a transitive dependency. Can it also remove a dependency not added as transitive?
Jeff Lockhart
09/14/2022, 6:20 PM
I think I found a solution. If I declare the dependency as
compileOnly
in the parent source set, I can then add the appropriate variant in child source sets. The parent dependency is the desired dependency in one of the children, so I just re-add it as