Search in sources :

Example 1 with ExternalResourceResolverDescriptorParseContext

use of org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolverDescriptorParseContext in project gradle by gradle.

the class AbstractRepositoryMetadataSource method parseMetaDataFromArtifact.

@Nullable
private S parseMetaDataFromArtifact(String repositoryName, ComponentResolvers componentResolvers, ModuleComponentIdentifier moduleComponentIdentifier, ExternalResourceArtifactResolver artifactResolver, ResourceAwareResolveResult result) {
    ModuleComponentArtifactMetadata artifact = getMetaDataArtifactFor(moduleComponentIdentifier);
    LocallyAvailableExternalResource metadataArtifact = artifactResolver.resolveArtifact(artifact, result);
    if (metadataArtifact != null) {
        ExternalResourceResolverDescriptorParseContext context = new ExternalResourceResolverDescriptorParseContext(componentResolvers, fileResourceRepository);
        return parseMetaDataFromResource(moduleComponentIdentifier, metadataArtifact, artifactResolver, context, repositoryName);
    }
    return null;
}
Also used : ModuleComponentArtifactMetadata(org.gradle.internal.component.external.model.ModuleComponentArtifactMetadata) LocallyAvailableExternalResource(org.gradle.internal.resource.local.LocallyAvailableExternalResource) ExternalResourceResolverDescriptorParseContext(org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolverDescriptorParseContext) Nullable(javax.annotation.Nullable)

Aggregations

Nullable (javax.annotation.Nullable)1 ExternalResourceResolverDescriptorParseContext (org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolverDescriptorParseContext)1 ModuleComponentArtifactMetadata (org.gradle.internal.component.external.model.ModuleComponentArtifactMetadata)1 LocallyAvailableExternalResource (org.gradle.internal.resource.local.LocallyAvailableExternalResource)1