Search in sources :

Example 1 with InclusiveRepositoryContentDescriptor

use of org.gradle.api.artifacts.repositories.InclusiveRepositoryContentDescriptor in project spring-security by spring-projects.

the class GitHubChangelogPlugin method createRepository.

private void createRepository(Project project) {
    IvyArtifactRepository repository = project.getRepositories().ivy(new Action<IvyArtifactRepository>() {

        @Override
        public void execute(IvyArtifactRepository repository) {
            repository.setUrl("https://github.com/");
            repository.patternLayout(new Action<IvyPatternRepositoryLayout>() {

                @Override
                public void execute(IvyPatternRepositoryLayout layout) {
                    layout.artifact("[organization]/[artifact]/releases/download/v[revision]/[artifact].[ext]");
                }
            });
            repository.getMetadataSources().artifact();
        }
    });
    project.getRepositories().exclusiveContent(new Action<ExclusiveContentRepository>() {

        @Override
        public void execute(ExclusiveContentRepository exclusiveContentRepository) {
            exclusiveContentRepository.forRepositories(repository);
            exclusiveContentRepository.filter(new Action<InclusiveRepositoryContentDescriptor>() {

                @Override
                public void execute(InclusiveRepositoryContentDescriptor descriptor) {
                    descriptor.includeGroup("spring-io");
                }
            });
        }
    });
}
Also used : Action(org.gradle.api.Action) ExclusiveContentRepository(org.gradle.api.artifacts.repositories.ExclusiveContentRepository) IvyPatternRepositoryLayout(org.gradle.api.artifacts.repositories.IvyPatternRepositoryLayout) IvyArtifactRepository(org.gradle.api.artifacts.repositories.IvyArtifactRepository) InclusiveRepositoryContentDescriptor(org.gradle.api.artifacts.repositories.InclusiveRepositoryContentDescriptor)

Aggregations

Action (org.gradle.api.Action)1 ExclusiveContentRepository (org.gradle.api.artifacts.repositories.ExclusiveContentRepository)1 InclusiveRepositoryContentDescriptor (org.gradle.api.artifacts.repositories.InclusiveRepositoryContentDescriptor)1 IvyArtifactRepository (org.gradle.api.artifacts.repositories.IvyArtifactRepository)1 IvyPatternRepositoryLayout (org.gradle.api.artifacts.repositories.IvyPatternRepositoryLayout)1