Why resolvedConfiguration.resolvedArtifacts does not include FileCollectionDependency?

(Mor) #1


Using gradle 4.10, When I use someConfig.getResolvedConfiguration().getResolvedArtifacts() - it only returns transitive dependencies of type Project and Module - but not dependencies of type FileCollectionDependency.

My question is: why? why is it different?

This forces me to iterate recursively over the configuration and it’s dependent projects to find all FileCollectionDependency dependencies.

Why do I need it?
I need to convert each and every dependency to a task using some logic. While it works fine - I wish resolvedArtifacts would contain the transitive FileCollectionDependency such that I won’t have to iterate and collect them myself.


(Mor) #2

Would appreciate an explanation.
If this is NOT the intended behavior (as in a bug) - just let me know and i’ll open an issue for it…