use of org.gradle.internal.component.external.model.DefaultModuleComponentArtifactMetadata in project gradle by gradle.
the class DefaultGradleModuleMetadataSource method create.
@Override
public MutableModuleComponentResolveMetadata create(String repositoryName, ComponentResolvers componentResolvers, ModuleComponentIdentifier moduleComponentIdentifier, ComponentOverrideMetadata prescribedMetaData, ExternalResourceArtifactResolver artifactResolver, BuildableModuleComponentMetaDataResolveResult result) {
DefaultIvyArtifactName moduleMetadataArtifact = new DefaultIvyArtifactName(moduleComponentIdentifier.getModule(), "module", "module");
DefaultModuleComponentArtifactMetadata artifactId = new DefaultModuleComponentArtifactMetadata(moduleComponentIdentifier, moduleMetadataArtifact);
LocallyAvailableExternalResource gradleMetadataArtifact = artifactResolver.resolveArtifact(artifactId, result);
if (gradleMetadataArtifact != null) {
MutableModuleComponentResolveMetadata metaDataFromResource = mutableModuleMetadataFactory.createForGradleModuleMetadata(moduleComponentIdentifier);
metadataParser.parse(gradleMetadataArtifact, metaDataFromResource);
validateGradleMetadata(metaDataFromResource);
createModuleSources(artifactId, gradleMetadataArtifact, metaDataFromResource);
metadataCompatibilityConverter.process(metaDataFromResource);
return metaDataFromResource;
}
return null;
}
Aggregations