diff --git a/build.gradle b/build.gradle index fc34e75..74f4e80 100644 --- a/build.gradle +++ b/build.gradle @@ -18,24 +18,28 @@ apply plugin: 'java' apply from: "https://raw.githubusercontent.com/gocd/gocd-plugin-gradle-task-helpers/master/helper.gradle?_=${(int) (new Date().toInstant().epochSecond / 60)}" gocdPlugin { - id = 'cd.go.artifact.docker.registry' - pluginVersion = '1.3.1' - goCdVersion = '20.9.0' - name = 'Artifact plugin for docker' - description = 'Plugin allows to push/pull docker image from public or private docker registry' - vendorName = 'Thoughtworks, Inc.' - vendorUrl = 'https://github.com/gocd/docker-registry-artifact-plugin' - - githubRepo { - owner = System.getenv('GITHUB_USER') ?: 'bob' - repo = 'docker-registry-artifact-plugin' - token = System.getenv('GITHUB_TOKEN') ?: 'bad-token' - } - - pluginProject = project - - prerelease = !"No".equalsIgnoreCase(System.getenv('PRERELEASE')) - assetsToRelease = [project.tasks.findByName('jar')] + id = 'cd.go.artifact.docker.registry' + pluginVersion = '1.3.1' + goCdVersion = '20.9.0' + name = 'Artifact plugin for docker' + description = 'Plugin allows to push/pull docker image from public or private docker registry' + vendorName = 'Thoughtworks, Inc.' + vendorUrl = 'https://github.com/gocd/docker-registry-artifact-plugin' + + githubRepo { + owner = System.getenv('GITHUB_USER') ?: 'bob' + repo = 'docker-registry-artifact-plugin' + token = System.getenv('GITHUB_TOKEN') ?: 'bad-token' + } + + pluginProject = project + + prerelease = !"No".equalsIgnoreCase(System.getenv('PRERELEASE')) + assetsToRelease = [project.tasks.findByName('jar')] + + licenseReport { + excludes = ['com.google.guava:guava-parent'] + } } version = gocdPlugin.fullVersion(project) @@ -51,9 +55,9 @@ java { ext { deps = [ - gocdPluginApi: 'cd.go.plugin:go-plugin-api:23.1.0', - awsSdk : 'com.amazonaws:aws-java-sdk:1.12.495', - slf4j : 'org.slf4j:slf4j-api:2.0.7', + gocdPluginApi: 'cd.go.plugin:go-plugin-api:23.1.0', + awsSdk : 'com.amazonaws:aws-java-sdk:1.12.495', + slf4j : 'org.slf4j:slf4j-api:2.0.7', ] versions = project.ext.deps.collectEntries { lib, libGav -> [lib, libGav.split(':').last()] } @@ -84,6 +88,20 @@ dependencies { } } + components { + // workaround for Guava metadata declaring dependencies that are not needed at runtime + // see https://github.com/google/guava/pull/6606 + withModule('com.google.guava:guava', { details -> + details.allVariants { + withDependencies { + removeAll { + it.group in ["com.google.code.findbugs", "org.checkerframework", "com.google.errorprone"] + } + } + } + }) + } + modules { module('commons-logging:commons-logging') { replacedBy('org.slf4j:jcl-over-slf4j', "Everything should go via SLF4J")