use of org.gradle.internal.component.external.model.AbstractLazyModuleComponentResolveMetadata in project gradle by gradle.
the class ModuleComponentResolveMetadataSerializer method read.
@Override
public ModuleComponentResolveMetadata read(Decoder decoder) throws EOFException, Exception {
Map<Integer, MavenDependencyDescriptor> deduplicationDependencyCache = Maps.newHashMap();
MutableModuleComponentResolveMetadata mutable = delegate.read(decoder, moduleIdentifierFactory, deduplicationDependencyCache);
readPlatformOwners(decoder, mutable);
AbstractLazyModuleComponentResolveMetadata resolveMetadata = (AbstractLazyModuleComponentResolveMetadata) mutable.asImmutable();
if (resolveMetadata instanceof DefaultIvyModuleResolveMetadata) {
return ivySerializationHelper.readMetadata(decoder, (DefaultIvyModuleResolveMetadata) resolveMetadata);
} else if (resolveMetadata instanceof DefaultMavenModuleResolveMetadata) {
return mavenSerializationHelper.readMetadata(decoder, (DefaultMavenModuleResolveMetadata) resolveMetadata, deduplicationDependencyCache);
} else {
throw new IllegalStateException("Unknown resolved metadata type: " + resolveMetadata.getClass());
}
}
Aggregations