Skip to content

Commit

Permalink
fix: spotbugsClasspath probably should follow the same pattern as plu…
Browse files Browse the repository at this point in the history
…ginJarFiles.

Done for consistency. Have not tested.
  • Loading branch information
autonomousapps committed Jan 16, 2025
1 parent 2362a6f commit 96dda4e
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/main/kotlin/com/github/spotbugs/snom/SpotBugsTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ abstract class SpotBugsTask : DefaultTask(), VerificationTask {
@get:Classpath
abstract val pluginJarFiles: ConfigurableFileCollection

@get:Internal
@get:Classpath
abstract val spotbugsClasspath: ConfigurableFileCollection

@get:Nested
Expand Down Expand Up @@ -374,14 +374,9 @@ abstract class SpotBugsTask : DefaultTask(), VerificationTask {

val pluginConfiguration = project.configurations.named(SpotBugsPlugin.PLUGINS_CONFIG_NAME)
pluginJarFiles.from(pluginConfiguration)
val configuration = project.configurations.getByName(SpotBugsPlugin.CONFIG_NAME)
val spotbugsSlf4j = project.configurations.getByName(SpotBugsPlugin.SLF4J_CONFIG_NAME)
spotbugsClasspath.from(
project.layout.files(
project.provider { spotbugsSlf4j.files },
project.provider { configuration.files },
),
)
val configuration = project.configurations.named(SpotBugsPlugin.CONFIG_NAME)
val spotbugsSlf4j = project.configurations.named(SpotBugsPlugin.SLF4J_CONFIG_NAME)
spotbugsClasspath.from(configuration, spotbugsSlf4j)
}

/**
Expand Down

0 comments on commit 96dda4e

Please sign in to comment.