use of org.gradle.api.artifacts.component.ModuleComponentIdentifier in project gradle by gradle.
the class IvyBackedArtifactPublisher method toPublishMetaData.
private BuildableIvyModulePublishMetadata toPublishMetaData(Module module, Set<? extends ConfigurationInternal> configurations) {
ModuleComponentIdentifier id = DefaultModuleComponentIdentifier.newId(module.getGroup(), module.getName(), module.getVersion());
DefaultIvyModulePublishMetadata publishMetaData = new DefaultIvyModulePublishMetadata(id, module.getStatus());
configurationComponentMetaDataBuilder.addConfigurations(publishMetaData, configurations);
return publishMetaData;
}
use of org.gradle.api.artifacts.component.ModuleComponentIdentifier in project gradle by gradle.
the class ComponentArtifactMetadataSerializer method read.
public ComponentArtifactMetadata read(Decoder decoder) throws Exception {
ModuleComponentIdentifier componentIdentifier = (ModuleComponentIdentifier) componentIdentifierSerializer.read(decoder);
String artifactName = decoder.readString();
String type = decoder.readString();
String extension = decoder.readNullableString();
String classifier = decoder.readNullableString();
return new DefaultModuleComponentArtifactMetadata(componentIdentifier, new DefaultIvyArtifactName(artifactName, type, extension, classifier));
}
use of org.gradle.api.artifacts.component.ModuleComponentIdentifier in project gradle by gradle.
the class IvyModuleDescriptorConverter method forIvyModuleDescriptor.
public ModuleDescriptorState forIvyModuleDescriptor(ModuleDescriptor ivyDescriptor) {
ModuleRevisionId moduleRevisionId = ivyDescriptor.getModuleRevisionId();
ModuleComponentIdentifier componentIdentifier = DefaultModuleComponentIdentifier.newId(moduleRevisionId.getOrganisation(), moduleRevisionId.getName(), moduleRevisionId.getRevision());
MutableModuleDescriptorState state = new MutableModuleDescriptorState(componentIdentifier, ivyDescriptor.getStatus(), ivyDescriptor.isDefault());
state.setBranch(moduleRevisionId.getBranch());
state.setDescription(ivyDescriptor.getDescription());
state.setPublicationDate(ivyDescriptor.getPublicationDate());
Map<NamespaceId, String> extraInfo = Cast.uncheckedCast(ivyDescriptor.getExtraInfo());
state.getExtraInfo().putAll(extraInfo);
for (ExcludeRule excludeRule : ivyDescriptor.getAllExcludeRules()) {
addExcludeRule(state, excludeRule);
}
return state;
}
use of org.gradle.api.artifacts.component.ModuleComponentIdentifier in project gradle by gradle.
the class ModuleComponentFileArtifactIdentifierSerializer method read.
@Override
public ModuleComponentFileArtifactIdentifier read(Decoder decoder) throws Exception {
ModuleComponentIdentifier componentIdentifier = (ModuleComponentIdentifier) componentIdentifierSerializer.read(decoder);
String fileName = decoder.readString();
return new ModuleComponentFileArtifactIdentifier(componentIdentifier, fileName);
}
use of org.gradle.api.artifacts.component.ModuleComponentIdentifier in project gradle by gradle.
the class AbstractResourcePattern method isComplete.
@Override
public boolean isComplete(ModuleComponentArtifactMetadata artifactIdentifier) {
IvyArtifactName artifactName = artifactIdentifier.getName();
ModuleComponentIdentifier componentIdentifier = artifactIdentifier.getId().getComponentIdentifier();
return isValidSubstitute(componentIdentifier.getModule(), false) && isValidSubstitute(componentIdentifier.getGroup(), organisationIsOptional) && isValidSubstitute(componentIdentifier.getVersion(), revisionIsOptional) && isValidSubstitute(artifactName.getName(), artifactIsOptional) && isValidSubstitute(artifactName.getClassifier(), classifierIsOptional) && isValidSubstitute(artifactName.getExtension(), extensionIsOptional) && isValidSubstitute(artifactName.getType(), typeIsOptional);
}
Aggregations