Search in sources :

Example 1 with DefaultMavenPomMetadataSource

use of org.gradle.api.internal.artifacts.repositories.metadata.DefaultMavenPomMetadataSource in project gradle by gradle.

the class DefaultMavenArtifactRepository method createMetadataSources.

ImmutableMetadataSources createMetadataSources(MavenMetadataLoader mavenMetadataLoader) {
    ImmutableList.Builder<MetadataSource<?>> sources = ImmutableList.builder();
    if (metadataSources.gradleMetadata) {
        // Don't list versions for gradleMetadata if maven-metadata.xml will be checked.
        boolean listVersionsForGradleMetadata = !metadataSources.mavenPom;
        sources.add(new DefaultGradleModuleMetadataSource(getMetadataParser(), metadataFactory, listVersionsForGradleMetadata));
    }
    if (metadataSources.mavenPom) {
        sources.add(new DefaultMavenPomMetadataSource(MavenMetadataArtifactProvider.INSTANCE, getPomParser(), fileResourceRepository, getMetadataValidationServices(), mavenMetadataLoader));
    }
    if (metadataSources.artifact) {
        sources.add(new DefaultArtifactMetadataSource(metadataFactory));
    }
    return new DefaultImmutableMetadataSources(sources.build());
}
Also used : DefaultArtifactMetadataSource(org.gradle.api.internal.artifacts.repositories.metadata.DefaultArtifactMetadataSource) DefaultImmutableMetadataSources(org.gradle.api.internal.artifacts.repositories.metadata.DefaultImmutableMetadataSources) ImmutableList(com.google.common.collect.ImmutableList) DefaultMavenPomMetadataSource(org.gradle.api.internal.artifacts.repositories.metadata.DefaultMavenPomMetadataSource) MetadataSource(org.gradle.api.internal.artifacts.repositories.metadata.MetadataSource) DefaultGradleModuleMetadataSource(org.gradle.api.internal.artifacts.repositories.metadata.DefaultGradleModuleMetadataSource) DefaultArtifactMetadataSource(org.gradle.api.internal.artifacts.repositories.metadata.DefaultArtifactMetadataSource) DefaultGradleModuleMetadataSource(org.gradle.api.internal.artifacts.repositories.metadata.DefaultGradleModuleMetadataSource) DefaultMavenPomMetadataSource(org.gradle.api.internal.artifacts.repositories.metadata.DefaultMavenPomMetadataSource)

Aggregations

ImmutableList (com.google.common.collect.ImmutableList)1 DefaultArtifactMetadataSource (org.gradle.api.internal.artifacts.repositories.metadata.DefaultArtifactMetadataSource)1 DefaultGradleModuleMetadataSource (org.gradle.api.internal.artifacts.repositories.metadata.DefaultGradleModuleMetadataSource)1 DefaultImmutableMetadataSources (org.gradle.api.internal.artifacts.repositories.metadata.DefaultImmutableMetadataSources)1 DefaultMavenPomMetadataSource (org.gradle.api.internal.artifacts.repositories.metadata.DefaultMavenPomMetadataSource)1 MetadataSource (org.gradle.api.internal.artifacts.repositories.metadata.MetadataSource)1