use of org.gradle.api.internal.artifacts.repositories.DefaultIvyArtifactRepository in project gradle by gradle.
the class DependencyResolverIvyPublisher method publish.
@Override
public void publish(IvyNormalizedPublication publication, IvyArtifactRepository repository) {
IvyResolver publisher = ((DefaultIvyArtifactRepository) repository).createPublisher();
IvyPublicationIdentity projectIdentity = publication.getProjectIdentity();
ModuleComponentIdentifier moduleVersionIdentifier = DefaultModuleComponentIdentifier.newId(DefaultModuleIdentifier.newId(projectIdentity.getOrganisation(), projectIdentity.getModule()), projectIdentity.getRevision());
for (IvyArtifact artifact : publication.getAllArtifacts()) {
ModuleComponentArtifactMetadata artifactMetadata = new DefaultModuleComponentArtifactMetadata(moduleVersionIdentifier, createIvyArtifact(artifact));
publish(publisher, artifact, artifactMetadata);
}
}
use of org.gradle.api.internal.artifacts.repositories.DefaultIvyArtifactRepository in project gradle by gradle.
the class IvyPublishPlugin method hasStandardPattern.
private boolean hasStandardPattern(IvyArtifactRepository ivyArtifactRepository) {
DefaultIvyArtifactRepository repo = (DefaultIvyArtifactRepository) ivyArtifactRepository;
RepositoryDescriptor descriptor = repo.getDescriptor();
if (descriptor instanceof IvyRepositoryDescriptor) {
IvyRepositoryDescriptor desc = (IvyRepositoryDescriptor) descriptor;
List<String> artifactPatterns = desc.getArtifactPatterns();
if (artifactPatterns.size() == 1) {
return artifactPatterns.get(0).equals(IvyArtifactRepository.GRADLE_ARTIFACT_PATTERN);
} else {
return false;
}
}
return true;
}
Aggregations