use of org.gradle.internal.component.external.model.MutableIvyModuleResolveMetadata in project gradle by gradle.
the class IvyResolver method parseMetaDataFromResource.
protected MutableIvyModuleResolveMetadata parseMetaDataFromResource(ModuleComponentIdentifier moduleComponentIdentifier, LocallyAvailableExternalResource cachedResource, DescriptorParseContext context) {
MutableIvyModuleResolveMetadata metaData = metaDataParser.parseMetaData(context, cachedResource);
checkMetadataConsistency(moduleComponentIdentifier, metaData);
return metaData;
}
use of org.gradle.internal.component.external.model.MutableIvyModuleResolveMetadata in project gradle by gradle.
the class DefaultIvyDescriptorMetadataSource method parseMetaDataFromResource.
protected MutableIvyModuleResolveMetadata parseMetaDataFromResource(ModuleComponentIdentifier moduleComponentIdentifier, LocallyAvailableExternalResource cachedResource, ExternalResourceArtifactResolver artifactResolver, DescriptorParseContext context, String repoName) {
MutableIvyModuleResolveMetadata metaData = metaDataParser.parseMetaData(context, cachedResource);
checkMetadataConsistency(moduleComponentIdentifier, metaData);
return metaData;
}
use of org.gradle.internal.component.external.model.MutableIvyModuleResolveMetadata in project gradle by gradle.
the class IvyModuleResolveMetaDataBuilder method build.
public MutableIvyModuleResolveMetadata build() {
ModuleRevisionId moduleRevisionId = ivyDescriptor.getModuleRevisionId();
ModuleComponentIdentifier cid = DefaultModuleComponentIdentifier.newId(moduleRevisionId.getOrganisation(), moduleRevisionId.getName(), moduleRevisionId.getRevision());
List<Configuration> configurations = converter.extractConfigurations(ivyDescriptor);
List<IvyDependencyDescriptor> dependencies = converter.extractDependencies(ivyDescriptor);
List<Exclude> excludes = converter.extractExcludes(ivyDescriptor);
Map<NamespaceId, String> extraAttributes = converter.extractExtraAttributes(ivyDescriptor);
MutableIvyModuleResolveMetadata metadata = metadataFactory.create(cid, dependencies, configurations, artifacts, excludes);
metadata.setStatus(ivyDescriptor.getStatus());
metadata.setExtraAttributes(extraAttributes);
metadata.setBranch(ivyDescriptor.getModuleRevisionId().getBranch());
return metadata;
}
use of org.gradle.internal.component.external.model.MutableIvyModuleResolveMetadata in project gradle by gradle.
the class IvyMutableModuleMetadataFactory method missing.
@Override
public MutableIvyModuleResolveMetadata missing(ModuleComponentIdentifier from) {
MutableIvyModuleResolveMetadata metadata = create(from);
metadata.setMissing(true);
return metadata;
}
use of org.gradle.internal.component.external.model.MutableIvyModuleResolveMetadata in project gradle by gradle.
the class ValidatingIvyPublisher method validateMetadata.
private void validateMetadata(IvyNormalizedPublication publication) {
IvyPublicationIdentity identity = publication.getProjectIdentity();
IvyFieldValidator organisation = field(publication, "organisation", identity.getOrganisation()).notEmpty().validInFileName();
IvyFieldValidator moduleName = field(publication, "module name", identity.getModule()).notEmpty().validInFileName();
IvyFieldValidator revision = field(publication, "revision", identity.getRevision()).notEmpty().validInFileName();
MutableIvyModuleResolveMetadata metadata = parseIvyFile(publication);
ModuleVersionIdentifier moduleId = metadata.getModuleVersionId();
organisation.matches(moduleId.getGroup());
moduleName.matches(moduleId.getName());
revision.matches(moduleId.getVersion());
field(publication, "branch", metadata.getBranch()).optionalNotEmpty().doesNotContainSpecialCharacters(true);
field(publication, "status", metadata.getStatus()).optionalNotEmpty().validInFileName();
}
Aggregations