use of org.gradle.internal.component.model.ComponentOverrideMetadata in project gradle by gradle.
the class ComponentState method resolve.
public void resolve() {
if (alreadyResolved()) {
return;
}
ComponentOverrideMetadata componentOverrideMetadata;
if (selectors != null && selectors.size() > 0) {
// Taking the first selector here to determine the 'changing' status and 'client module' is our best bet to get the selector that will most likely be chosen in the end.
// As selectors are sorted accordingly (see ModuleSelectors.SELECTOR_COMPARATOR).
SelectorState firstSelector = selectors.first();
componentOverrideMetadata = DefaultComponentOverrideMetadata.forDependency(firstSelector.isChanging(), selectors.getFirstDependencyArtifact(), firstSelector.getClientModule());
} else {
componentOverrideMetadata = DefaultComponentOverrideMetadata.EMPTY;
}
DefaultBuildableComponentResolveResult result = new DefaultBuildableComponentResolveResult();
if (tryResolveVirtualPlatform()) {
return;
}
resolver.resolve(componentIdentifier, componentOverrideMetadata, result);
if (result.getFailure() != null) {
metadataResolveFailure = result.getFailure();
return;
}
metadata = result.getMetadata();
}
Aggregations