Hi Folks
I’ve got a challenge that I apparently can’t solve myself. I have switched off transitive dependency resolution globally and want to have it enabled for solely one dependency (my core project). Additionally I also want this transitive resolution to only affect the “first level” - meaning the transitive policy shall not be applied to any of the parent project’s dependencies.
my simplified build.gradle:
apply plugin: 'java'
configurations.all {
transitive = false
}
dependencies {
compile ("foo:bar:1.3.0-SNAPSHOT") {
transitive = true
}
}
If I remove the configurations.all global switch - it works and tries to pull the dependencies, BUT not just foo:bar’s but also recursively its dependencies.
Question is: a) Why does the override of configurations.all.transitive through the artifacts own configuration not work? and b) How can I limit the dependency resolution depth to lets say “1”?
Hope I made myself understandable …
Thanks for any help or hints on that!
Tino