use of org.gradle.internal.component.external.model.DefaultModuleComponentArtifactIdentifier in project gradle by gradle.
the class ComponentArtifactIdentifierSerializer method write.
public void write(Encoder encoder, ComponentArtifactIdentifier value) throws Exception {
if (value instanceof DefaultModuleComponentArtifactIdentifier) {
DefaultModuleComponentArtifactIdentifier moduleComponentArtifactIdentifier = (DefaultModuleComponentArtifactIdentifier) value;
componentIdentifierSerializer.write(encoder, moduleComponentArtifactIdentifier.getComponentIdentifier());
IvyArtifactName ivyArtifactName = moduleComponentArtifactIdentifier.getName();
encoder.writeString(ivyArtifactName.getName());
encoder.writeString(ivyArtifactName.getType());
encoder.writeNullableString(ivyArtifactName.getExtension());
encoder.writeNullableString(ivyArtifactName.getClassifier());
} else {
throw new IllegalArgumentException("Unknown identifier type.");
}
}
use of org.gradle.internal.component.external.model.DefaultModuleComponentArtifactIdentifier in project gradle by gradle.
the class ComponentArtifactIdentifierSerializer method read.
public ComponentArtifactIdentifier 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 DefaultModuleComponentArtifactIdentifier(componentIdentifier, artifactName, type, extension, classifier);
}
Aggregations