[GRADLE-2903] ComponentMetadataDetails from items in a resolved configuration Created: 30/Sep/13  Updated: 16/Feb/14  Resolved: 16/Feb/14

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 1.12-rc-1

Type: Task
Reporter: Gradle Forums Assignee: Peter Niederwieser
Resolution: Fixed Votes: 0


 Description   

Can someone confirm that dependencies.components.eachComponent is only called on a cache-miss? I.e. only the first time a component is visited, and NOT on subsequent runs of Gradle?

I have a use-case which requires access to the ModuleMetadata in a afterResolve check, which isn't available in any easy way. My first stab was to save the details.metadata field while in the eachComponent for processing in afterResolve, which was working, but only on the first occasion. The use-case would be equivalent to the maven release plugin which ensures that there are no snapshot dependencies when releasing. There is no way in Gradle, as far as I can tell, to accomplish this when using Ivy modules which require access to the status field to determine this.

It might be another issue but it's pretty clear that the resolve cache stores all sorts of info, but not status,meaning it's essentially not available outside of the initial resolve.


Generated at Wed Jun 30 12:34:34 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.