I need to have a list of dependencies for each subproject with effective dependency versions. There are some version conflicts for some transitive dependencies and higher version is used. So if I execute gradle dependencies
I see smth like this:
com.github.jnr:jnr-posix:3.0.61 -> 3.1.5
So subproject has transitive dependency of version 3.0.61
, but since there is higher version 3.1.5
in the project, it will be used.
I have next task now:
task listDependencies() {
doFirst {
subprojects {
it.project.configurations.resolvableImpl.resolvedConfiguration.resolvedArtifacts.each {
println(it.file.name)
}
}
}
}
It lists 3.0.61
version, but it does not exist in the final package. I need to get final effective version in that list somehow.
Any ideas?