On 12/12/2011, at 12:19 AM, Luke Daley wrote: > Hi, > > I just realised that this has been deprecated. The deprecation message is > really not good enough as it gives no hint as to what the new API to use is. > > It's here: > http://github.com/gradle/gradle/tree/master/subprojects/core-impl/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolvedArtifact.java#L44 > > The javadoc offers some help: > https://github.com/gradle/gradle/blob/master/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ResolvedArtifact.java#L39 > > But getModuleVersion() doesn't replace the functionality offered by > ResolvedDependency (e.g. getParents() & getChildren()).
Not yet. The plan is to flesh out ResolvedModuleVersion with more meta-data. > > Regardless of whether or not we still offer the functionality of > ResolvedArtifact or not, I think we need a better message for the user. I'll > happily add it if someone can let me know what the story is. It depend what you want to do. At this stage, the general solution is to trawl the graph down from ResolvedConfiguration.firstLevelModuleDependencies to find the stuff you want. But this was also true before the deprecation, as an artifact can appear in multiple configurations (aka ResolvedDependency), and sometimes is a function of the dependency (ie the edges in the graph) rather than a configuration (ie the ResolvedDependency). -- Adam Murdoch Gradle Co-founder http://www.gradle.org VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com
