On 12/12/2011, at 6:12 AM, Adam Murdoch wrote:

> 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).

Updated.

https://github.com/gradle/gradle/commit/87807032ef2d8abe024d36f20d77d34ca7652293

Please check quickly to ensure it's correct.

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com

Reply via email to