I tried setting up a custom findbugs task with gradle, which would have a different pluginClass path than the standard ones.
Thus, default tasks should use standard FindBugs rules, while custom tasks should use findbugs security rules. My configuration looks like this:
dependencies { findbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.4.4' } findbugs { // general config } task findbugsSecurity(type: FindBugs, dependsOn: classes) { classes = fileTree(project.sourceSets.main.output.classesDir) source = project.sourceSets.main.java.srcDirs classpath = files() pluginClasspath = files(configurations.findbugsPlugins.asPath) }
However, if I now run the findbugsMain task, it also includes checks from findbugs-security!
How can I configure it so that search-based checks are only used in a custom task?
source share