use of org.gradle.internal.component.external.model.ivy.IvyModuleResolveMetadata in project gradle by gradle.
the class MetadataDescriptorFactory method createDescriptor.
public <T> T createDescriptor(Class<T> descriptorClass) {
if (isIvyMetadata(descriptorClass, metadata)) {
IvyModuleResolveMetadata ivyMetadata = (IvyModuleResolveMetadata) metadata;
IvyModuleDescriptor descriptor = new DefaultIvyModuleDescriptor(ivyMetadata.getExtraAttributes(), ivyMetadata.getBranch(), ivyMetadata.getStatus());
return descriptorClass.cast(descriptor);
} else if (isPomMetadata(descriptorClass, metadata)) {
MavenModuleResolveMetadata mavenMetadata = (MavenModuleResolveMetadata) metadata;
PomModuleDescriptor descriptor = new DefaultPomModuleDescriptor(mavenMetadata);
return descriptorClass.cast(descriptor);
}
return null;
}
Aggregations