How do I get the resolution report?

In the documentation, it mentions being able to get a “resolution result”, but it doesn’t say where it can be gotten from.

Since Gradle 1.2 there is also a new programmatic API to access the resolved dependency information. The dependency reports (see the previous paragraph) are using this API behind the hood. The API lets you to walk the resolved dependency graph and provides information about the dependencies. With the coming releases the API will grow to provide more information about the resolution result. For more information about the API please refer to the javadocs on ResolvableDependencies.getResolutionResult().

One example on stackoverflow pointed to conf.resolvedConfiguration.resolutionResult, but there’s mention of resolutionResult on the Resolved Configuration (http://www.gradle.org/docs/current/javadoc/org/gradle/api/artifacts/ResolvedConfiguration.html) javadoc page. What is the parent object that a resolution result comes from? And is it going to be for a single configuration?

There’s a complete example here…

http://www.gradle.org/docs/current/dsl/org.gradle.api.artifacts.ResolutionStrategy.html

Thanks for the link. It doesn’t make references to ResolvableDependencies or resolutionResult, which is what is in the documentation. I’m just trying to make the connection from Project to a resolutionResult, which that page does’t do.

Likewise, that documentation is helpful for making resolution rules. I’m looking for a final resolve, and not how to affect it. And I need it outside of resolutionStrategy closure, since I need to use the resolved values in a project.publishing.publications.ivy.descriptor.withXml closure.

Sorry, I didn’t read well enough.

‘configurations.compile.incoming’ gives you a ‘ResolvableDependencies’, and you can get ‘resolutionResult’ on that.

I think you want ‘configurations.compile.incoming.resolutionResult’: Configuration.incoming is perhaps a little obscure.

Thank! That’s it.

Wow, the ResolutionResult data structure is 1000% better than the Ivy data structures.