Hi all,
I am not sure if I’m having a problem, or simply misunderstanding, as I am new to gradle.
What I have is the following scenario:
- I have a gradle project, call it GP1, which produces an artifact, call it A1. 2. I have a second gradle project, GP2, which produces artifact A2, and has a dependency of A1 artifact. 3. I have a third gradle project, GP3, which produces artifact A3, and has a dependency of artifact A2, excluding A1. 4. I have the fourth and final gradle project, GP4, which produces artifact A4, and has a dependency of A3.
code snippets:
- GP2 (which produces A2):
dependencies { someDep1 (‘someGroup:A1:someVersion’) } |
- GP3 (which produces A3):
dependencies { someDep2 (‘someGroup:A2:someVersion’) { exclude module: ‘A1’ } } |
- GP4:
dependencies { someDep3 (‘someGroup:A3:someVersion’) } |
Now, on GP3, executing:
gradle dependencies | grep A1
as expected, does not yield results.
However,
on GP4, executing:
gradle dependencies | grep A1
actually shows it is there.
I would expect A1 not to be in the dependencies tree of GP4.
Does that scenario is a problem?
If not, can anyone please elaborate on the reason behind this behavior?
Thanks,
Ohad