use of org.gradle.api.internal.artifacts.repositories.metadata.DefaultImmutableMetadataSources 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());
}
Aggregations