I hope I’m using the correct terms here.
There are different configurations which influence the classpaths. We have 'compile‘, ‘testCompile’, ‘providedCompile’ etc.
When I define a dependency:
all transitive dependencies this has are not in the ‘compile’ configuration. That’s because we set this:
compile.transitive = false
But now I need Jersey’s transitive dependency on HK2 to be in the ‘compile’ configuration. (because it needs to be on the classpath while compiling and the Gradle IDEA plugin marks everything that is not ‘compile’ as ‘runtime’ and so in our IDE it doesn’t compile).
Now my workaround is this:
By explicitly defining the dependency it is in ‘compile’. BUT now I need to specify the version of HK2 explicitly as well. But I don’t want to do that. I want the version that Jersey requires.
So I want to put the HK2 dependency in the ‘compile’ configuration without re-defining the complete dependency with its version.