Skip to content

Commit

Permalink
fix: failed to load SpotBugs plugin from 5.0.15
Browse files Browse the repository at this point in the history
Signed-off-by: Kengo TODA <skypencil@gmail.com>
  • Loading branch information
KengoTODA committed Aug 1, 2023
1 parent d8f800a commit 5ee13e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ private Configuration createPluginConfiguration(Project project) {
project
.getConfigurations()
.create(SpotBugsPlugin.INTERNAL_CONFIG_NAME)
.extendsFrom(configuration)
.setDescription(
"configuration for the external SpotBugs plugins excluding transitive dependencies")
.setTransitive(false);
Expand Down
9 changes: 3 additions & 6 deletions src/main/groovy/com/github/spotbugs/snom/SpotBugsTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -352,17 +352,14 @@ abstract class SpotBugsTask extends DefaultTask implements VerificationTask {
setDescription("Run SpotBugs analysis.")
setGroup(JavaBasePlugin.VERIFICATION_GROUP)
def internalPluginConfiguration = project.configurations.getByName(SpotBugsPlugin.INTERNAL_CONFIG_NAME)
def pluginConfiguration = project.configurations.getByName(SpotBugsPlugin.PLUGINS_CONFIG_NAME)
pluginJarFiles = project.layout.files {
internalPluginConfiguration.files
internalPluginConfiguration.resolve()
}
def pluginConfiguration = project.configurations.getByName(SpotBugsPlugin.PLUGINS_CONFIG_NAME)

def configuration = project.getConfigurations().getByName(SpotBugsPlugin.CONFIG_NAME)
def logger = this.log

def spotbugsSlf4j = project.configurations.getByName(SpotBugsPlugin.SLF4J_CONFIG_NAME)
spotbugsClasspath = project.layout.files {
spotbugsSlf4j.files + pluginConfiguration.files + configuration.files
spotbugsSlf4j.resolve() + pluginConfiguration.resolve() + configuration.resolve()
}
}

Expand Down

0 comments on commit 5ee13e4

Please sign in to comment.