Skip to content

Commit

Permalink
Remove unnecessary transitive guava dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
chadlwilson committed Jul 1, 2023
1 parent 1e66c3a commit 8493a1b
Showing 1 changed file with 36 additions and 18 deletions.
54 changes: 36 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 8493a1b

Please sign in to comment.