Search in sources :

Example 1 with DefaultMutableIvyModuleResolveMetadata

use of org.gradle.internal.component.external.model.DefaultMutableIvyModuleResolveMetadata in project gradle by gradle.

the class IvyModuleResolveMetaDataBuilder method build.

public DefaultMutableIvyModuleResolveMetadata build() {
    ModuleDescriptorState descriptorState = converter.forIvyModuleDescriptor(ivyDescriptor);
    for (Artifact artifact : artifacts) {
        descriptorState.addArtifact(artifact.getArtifactName(), artifact.getConfigurations());
    }
    List<Configuration> configurations = converter.extractConfigurations(ivyDescriptor);
    List<IvyDependencyMetadata> dependencies = converter.extractDependencies(ivyDescriptor);
    ModuleComponentIdentifier cid = descriptorState.getComponentIdentifier();
    ModuleVersionIdentifier mvi = moduleIdentifierFactory.moduleWithVersion(cid.getGroup(), cid.getModule(), cid.getVersion());
    return new DefaultMutableIvyModuleResolveMetadata(mvi, cid, descriptorState, configurations, dependencies);
}
Also used : ModuleVersionIdentifier(org.gradle.api.artifacts.ModuleVersionIdentifier) Configuration(org.gradle.internal.component.external.descriptor.Configuration) IvyDependencyMetadata(org.gradle.internal.component.external.model.IvyDependencyMetadata) ModuleComponentIdentifier(org.gradle.api.artifacts.component.ModuleComponentIdentifier) ModuleDescriptorState(org.gradle.internal.component.external.descriptor.ModuleDescriptorState) DefaultMutableIvyModuleResolveMetadata(org.gradle.internal.component.external.model.DefaultMutableIvyModuleResolveMetadata) Artifact(org.gradle.internal.component.external.descriptor.Artifact)

Aggregations

ModuleVersionIdentifier (org.gradle.api.artifacts.ModuleVersionIdentifier)1 ModuleComponentIdentifier (org.gradle.api.artifacts.component.ModuleComponentIdentifier)1 Artifact (org.gradle.internal.component.external.descriptor.Artifact)1 Configuration (org.gradle.internal.component.external.descriptor.Configuration)1 ModuleDescriptorState (org.gradle.internal.component.external.descriptor.ModuleDescriptorState)1 DefaultMutableIvyModuleResolveMetadata (org.gradle.internal.component.external.model.DefaultMutableIvyModuleResolveMetadata)1 IvyDependencyMetadata (org.gradle.internal.component.external.model.IvyDependencyMetadata)1