I am trying to build a report task similar to ‘org.gradle.api.tasks.diagnostics.DependencyReportTask’ except that I want to generate a file that gives, for each module, the list of dependencies with: groupId, artifactId, version and scope.
Right now a simple CSV will do. I have built the plugin and it produces something that does almost what I want except that I have a lot of dependencies that are unresolved: ‘null’ for the group and version and ‘unspecified’ for the artifact.
I understand we need to go to the resolvedConfiguration to get resolvedDependencies. But I don’t find the information that I want in this model.
Which API should I use? Is there an easy way to filter the internal dependencies from the list (i.e. the modules of the project that another module depends on).