Basically, if you want to add a new "tool" to your project, you add it as a plugin in `build.gradle`:
plugins {
id "com.github.spotbugs" version "4.5.0"
}
Then, in the same file, you configure it: spotbugs {
visitors = [ 'FindSqlInjection', 'SwitchFallthrough' ]
// more config
}
Some plugins require external files, but that's usually because the plugin was not designed for Gradle and/or the authors didn't bother to add some code in their plugins to read config from the project file (which is usually very easy).