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));
}
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);
}
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();
}
}
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;
}
Aggregations