From b5122c2e1ffeb0437c2b94370f12b1f20ea6038d Mon Sep 17 00:00:00 2001 From: Kengo TODA Date: Wed, 31 Oct 2018 10:48:16 +0800 Subject: [PATCH] close #62: use runtime classpath instead of compile classpath --- CHANGELOG.md | 4 ++++ src/main/java/com/github/spotbugs/SpotBugsPlugin.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72a489195..679ab4112 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ Currently the versioning policy of this project follows [Semantic Versioning](ht * Prevent NPE in unexpected situations where no reports are enabled, despite xml being set by default using convention mapping (See [#61](https://github.com/spotbugs/spotbugs-gradle-plugin/issues/61), [#68](https://github.com/spotbugs/spotbugs-gradle-plugin/issues/68)) +### Fixed + +* Analyze runtime classpath instead of compile classpath. [#62](https://github.com/spotbugs/spotbugs-gradle-plugin/issues/62) + ## 1.6.5 - 2018-10-17 ### Changed diff --git a/src/main/java/com/github/spotbugs/SpotBugsPlugin.java b/src/main/java/com/github/spotbugs/SpotBugsPlugin.java index e8e98666f..4a226c043 100644 --- a/src/main/java/com/github/spotbugs/SpotBugsPlugin.java +++ b/src/main/java/com/github/spotbugs/SpotBugsPlugin.java @@ -201,6 +201,6 @@ protected void configureForSourceSet(final SourceSet sourceSet, SpotBugsTask tas .forEach(tree -> tree.builtBy(sourceSet.getClassesTaskName())); return presentClassDirs; }); - taskMapping.map("classpath", sourceSet::getCompileClasspath); + taskMapping.map("classpath", sourceSet::getRuntimeClasspath); } }