Hi. I'm struggling to make the dependencies for a project play nice, and was wondering if anyone could point me in the right direction.
Gradle version: 5.1.1, IDE: IntelliJ, Language: Java
2 dependencies. Will call them A and B.
1 transient dependency. Will call it C.
A depends on C_1.0, can't use later versions.
B depends on C_2.0, can't use earlier versions.
Normally, it would seem like I could use exclude statements.
What's causing me problems is that A is included from a local jar file.
(The line in build.gradle is "compile fileTree(dir: 'lib', include: '*.jar')"
'lib' also contains C_1.0 as a jar for A to depend on.
The program compiles.
When I run the program, B calls C_1.0 (where I want it to call C_2.0) and throws an exception.
(If I delete the C_1.0 jar file, the program calls B successfully, but then calls to A fail.)
I can't delete the local jars, or edit A or B.
Is there a way I can keep C_1.0 from interfering with calls to B?
Any tips appreciated. I'm really stuck on this one.