Search in sources :

Example 1 with ComponentResult

use of org.gradle.api.artifacts.result.ComponentResult in project gradle by gradle.

the class DefaultArtifactResolutionQuery method createResult.

private ArtifactResolutionResult createResult(ComponentMetaDataResolver componentMetaDataResolver, ArtifactResolver artifactResolver) {
    Set<ComponentResult> componentResults = Sets.newHashSet();
    for (ComponentIdentifier componentId : componentIds) {
        try {
            ComponentIdentifier validId = validateComponentIdentifier(componentId);
            componentResults.add(buildComponentResult(validId, componentMetaDataResolver, artifactResolver));
        } catch (Throwable t) {
            componentResults.add(new DefaultUnresolvedComponentResult(componentId, t));
        }
    }
    return new DefaultArtifactResolutionResult(componentResults);
}
Also used : DefaultUnresolvedComponentResult(org.gradle.api.internal.artifacts.result.DefaultUnresolvedComponentResult) ComponentResult(org.gradle.api.artifacts.result.ComponentResult) DefaultArtifactResolutionResult(org.gradle.api.internal.artifacts.result.DefaultArtifactResolutionResult) ProjectComponentIdentifier(org.gradle.api.artifacts.component.ProjectComponentIdentifier) ComponentIdentifier(org.gradle.api.artifacts.component.ComponentIdentifier) DefaultModuleComponentIdentifier(org.gradle.internal.component.external.model.DefaultModuleComponentIdentifier) ModuleComponentIdentifier(org.gradle.api.artifacts.component.ModuleComponentIdentifier) DefaultUnresolvedComponentResult(org.gradle.api.internal.artifacts.result.DefaultUnresolvedComponentResult)

Aggregations

ComponentIdentifier (org.gradle.api.artifacts.component.ComponentIdentifier)1 ModuleComponentIdentifier (org.gradle.api.artifacts.component.ModuleComponentIdentifier)1 ProjectComponentIdentifier (org.gradle.api.artifacts.component.ProjectComponentIdentifier)1 ComponentResult (org.gradle.api.artifacts.result.ComponentResult)1 DefaultArtifactResolutionResult (org.gradle.api.internal.artifacts.result.DefaultArtifactResolutionResult)1 DefaultUnresolvedComponentResult (org.gradle.api.internal.artifacts.result.DefaultUnresolvedComponentResult)1 DefaultModuleComponentIdentifier (org.gradle.internal.component.external.model.DefaultModuleComponentIdentifier)1