Search in sources :

Example 1 with BuildableLocalConfigurationMetadata

use of org.gradle.internal.component.local.model.BuildableLocalConfigurationMetadata in project gradle by gradle.

the class DefaultIvyModulePublishMetadata method addConfiguration.

public BuildableLocalConfigurationMetadata addConfiguration(String name, Set<String> extendsFrom, boolean visible, boolean transitive) {
    List<String> sortedExtends = Lists.newArrayList(extendsFrom);
    Collections.sort(sortedExtends);
    Configuration configuration = new Configuration(name, transitive, visible, sortedExtends);
    configurations.put(name, configuration);
    return new ConfigurationMetadata(name);
}
Also used : Configuration(org.gradle.internal.component.external.descriptor.Configuration) BuildableLocalConfigurationMetadata(org.gradle.internal.component.local.model.BuildableLocalConfigurationMetadata)

Example 2 with BuildableLocalConfigurationMetadata

use of org.gradle.internal.component.local.model.BuildableLocalConfigurationMetadata in project gradle by gradle.

the class DefaultArtifactPublisher method addConfigurations.

private void addConfigurations(DefaultIvyModulePublishMetadata metaData, Collection<? extends ConfigurationInternal> configurations, boolean validateArtifacts) {
    for (ConfigurationInternal configuration : configurations) {
        BuildableLocalConfigurationMetadata configurationMetadata = addConfiguration(metaData, configuration);
        dependenciesConverter.addDependenciesAndExcludes(configurationMetadata, configuration);
        OutgoingVariant outgoingVariant = configuration.convertToOutgoingVariant();
        for (PublishArtifact publishArtifact : outgoingVariant.getArtifacts()) {
            if (!validateArtifacts || isValidToPublish(publishArtifact)) {
                metaData.addArtifact(configuration.getName(), publishArtifact);
            }
        }
    }
}
Also used : OutgoingVariant(org.gradle.api.internal.artifacts.configurations.OutgoingVariant) BuildableLocalConfigurationMetadata(org.gradle.internal.component.local.model.BuildableLocalConfigurationMetadata) PublishArtifact(org.gradle.api.artifacts.PublishArtifact) ConfigurationInternal(org.gradle.api.internal.artifacts.configurations.ConfigurationInternal)

Aggregations

BuildableLocalConfigurationMetadata (org.gradle.internal.component.local.model.BuildableLocalConfigurationMetadata)2 PublishArtifact (org.gradle.api.artifacts.PublishArtifact)1 ConfigurationInternal (org.gradle.api.internal.artifacts.configurations.ConfigurationInternal)1 OutgoingVariant (org.gradle.api.internal.artifacts.configurations.OutgoingVariant)1 Configuration (org.gradle.internal.component.external.descriptor.Configuration)1