you can set the reports "outputLocation" properties, my code example produces xml output:
spotbugsMain {
reports {
xml.outputLocation.set(layout.buildDirectory.file("/spotbugs/spotbugs.xml"))
}
}
Reference: https://github.com/spotbugs/spotbugs-gradle-plugin#readme