use of org.gradle.api.internal.artifacts.repositories.descriptor.RepositoryDescriptor 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