Search in sources :

Example 1 with RepositoryDescriptor

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;
}
Also used : DefaultIvyArtifactRepository(org.gradle.api.internal.artifacts.repositories.DefaultIvyArtifactRepository) IvyRepositoryDescriptor(org.gradle.api.internal.artifacts.repositories.descriptor.IvyRepositoryDescriptor) RepositoryDescriptor(org.gradle.api.internal.artifacts.repositories.descriptor.RepositoryDescriptor) IvyRepositoryDescriptor(org.gradle.api.internal.artifacts.repositories.descriptor.IvyRepositoryDescriptor)

Aggregations

DefaultIvyArtifactRepository (org.gradle.api.internal.artifacts.repositories.DefaultIvyArtifactRepository)1 IvyRepositoryDescriptor (org.gradle.api.internal.artifacts.repositories.descriptor.IvyRepositoryDescriptor)1 RepositoryDescriptor (org.gradle.api.internal.artifacts.repositories.descriptor.RepositoryDescriptor)1