Search in sources :

Example 1 with DefaultComponentArtifactsResult

use of org.gradle.api.internal.artifacts.result.DefaultComponentArtifactsResult in project gradle by gradle.

the class DefaultArtifactResolutionQuery method buildComponentResult.

private ComponentArtifactsResult buildComponentResult(ComponentIdentifier componentId, ComponentMetaDataResolver componentMetaDataResolver, ArtifactResolver artifactResolver) {
    BuildableComponentResolveResult moduleResolveResult = new DefaultBuildableComponentResolveResult();
    componentMetaDataResolver.resolve(componentId, DefaultComponentOverrideMetadata.EMPTY, moduleResolveResult);
    ComponentResolveMetadata component = moduleResolveResult.getMetadata();
    DefaultComponentArtifactsResult componentResult = new DefaultComponentArtifactsResult(component.getId());
    for (Class<? extends Artifact> artifactType : artifactTypes) {
        addArtifacts(componentResult, artifactType, component, artifactResolver);
    }
    return componentResult;
}
Also used : DefaultBuildableComponentResolveResult(org.gradle.internal.resolve.result.DefaultBuildableComponentResolveResult) BuildableComponentResolveResult(org.gradle.internal.resolve.result.BuildableComponentResolveResult) DefaultBuildableComponentResolveResult(org.gradle.internal.resolve.result.DefaultBuildableComponentResolveResult) ComponentResolveMetadata(org.gradle.internal.component.model.ComponentResolveMetadata) DefaultComponentArtifactsResult(org.gradle.api.internal.artifacts.result.DefaultComponentArtifactsResult)

Aggregations

DefaultComponentArtifactsResult (org.gradle.api.internal.artifacts.result.DefaultComponentArtifactsResult)1 ComponentResolveMetadata (org.gradle.internal.component.model.ComponentResolveMetadata)1 BuildableComponentResolveResult (org.gradle.internal.resolve.result.BuildableComponentResolveResult)1 DefaultBuildableComponentResolveResult (org.gradle.internal.resolve.result.DefaultBuildableComponentResolveResult)1