Search in sources :

Example 6 with Configuration

use of org.gradle.internal.component.external.descriptor.Configuration in project gradle by gradle.

the class GradlePomModuleDescriptorBuilder method addDependencyForRelocation.

public void addDependencyForRelocation(ModuleVersionSelector selector) {
    // Example: http://repo2.maven.org/maven2/com/atomikos/atomikos-util/3.6.4/atomikos-util-3.6.4.pom
    if (selector.getGroup().equals(descriptor.getComponentIdentifier().getGroup()) && selector.getName().equals(descriptor.getComponentIdentifier().getModule())) {
        return;
    }
    // TODO - this is a constant
    ListMultimap<String, String> confMappings = ArrayListMultimap.create();
    // Map dependency on all public configurations
    for (Configuration m2Conf : GradlePomModuleDescriptorBuilder.MAVEN2_CONFIGURATIONS.values()) {
        if (m2Conf.isVisible()) {
            confMappings.put(m2Conf.getName(), m2Conf.getName());
        }
    }
    dependencies.add(new IvyDependencyMetadata(selector, confMappings));
}
Also used : Configuration(org.gradle.internal.component.external.descriptor.Configuration) IvyDependencyMetadata(org.gradle.internal.component.external.model.IvyDependencyMetadata)

Example 7 with Configuration

use of org.gradle.internal.component.external.descriptor.Configuration in project gradle by gradle.

the class DefaultIvyModulePublishMetadata method addConfiguration.

@Override
public void addConfiguration(String name, String description, Set<String> extendsFrom, Set<String> hierarchy, boolean visible, boolean transitive, AttributeContainerInternal attributes, boolean canBeConsumed, boolean canBeResolved) {
    List<String> sortedExtends = Lists.newArrayList(extendsFrom);
    Collections.sort(sortedExtends);
    Configuration configuration = new Configuration(name, transitive, visible, sortedExtends);
    configurations.put(name, configuration);
}
Also used : Configuration(org.gradle.internal.component.external.descriptor.Configuration)

Example 8 with Configuration

use of org.gradle.internal.component.external.descriptor.Configuration in project gradle by gradle.

the class DefaultIvyModuleDescriptorWriter method printConfigurations.

private void printConfigurations(IvyModulePublishMetadata metadata, SimpleXmlWriter writer) throws IOException {
    Collection<Configuration> configurations = metadata.getConfigurations().values();
    if (!configurations.isEmpty()) {
        writer.startElement("configurations");
        for (Configuration configuration : configurations) {
            printConfiguration(configuration, writer);
        }
        writer.endElement();
    }
}
Also used : Configuration(org.gradle.internal.component.external.descriptor.Configuration)

Example 9 with Configuration

use of org.gradle.internal.component.external.descriptor.Configuration in project gradle by gradle.

the class AbstractModuleComponentResolveMetadata method populateConfigurationFromDescriptor.

private DefaultConfigurationMetadata populateConfigurationFromDescriptor(String name, Map<String, Configuration> configurationDefinitions, Map<String, DefaultConfigurationMetadata> configurations) {
    DefaultConfigurationMetadata populated = configurations.get(name);
    if (populated != null) {
        return populated;
    }
    Configuration descriptorConfiguration = configurationDefinitions.get(name);
    if (descriptorConfiguration == null) {
        return null;
    }
    ImmutableList<String> hierarchy = constructHierarchy(descriptorConfiguration);
    boolean transitive = descriptorConfiguration.isTransitive();
    boolean visible = descriptorConfiguration.isVisible();
    populated = createConfiguration(componentIdentifier, name, transitive, visible, hierarchy, variantMetadataRules);
    configurations.put(name, populated);
    return populated;
}
Also used : Configuration(org.gradle.internal.component.external.descriptor.Configuration)

Aggregations

Configuration (org.gradle.internal.component.external.descriptor.Configuration)9 ModuleRevisionId (org.apache.ivy.core.module.id.ModuleRevisionId)1 ModuleComponentIdentifier (org.gradle.api.artifacts.component.ModuleComponentIdentifier)1 NamespaceId (org.gradle.api.internal.artifacts.ivyservice.NamespaceId)1 DefaultModuleComponentIdentifier (org.gradle.internal.component.external.model.DefaultModuleComponentIdentifier)1 IvyDependencyDescriptor (org.gradle.internal.component.external.model.IvyDependencyDescriptor)1 IvyDependencyMetadata (org.gradle.internal.component.external.model.IvyDependencyMetadata)1 MutableIvyModuleResolveMetadata (org.gradle.internal.component.external.model.MutableIvyModuleResolveMetadata)1 BuildableLocalConfigurationMetadata (org.gradle.internal.component.local.model.BuildableLocalConfigurationMetadata)1 Exclude (org.gradle.internal.component.model.Exclude)1