是否可以整合Facebook 贡献 http://fb-contrib.sourceforge.net/带有 Gradle 的库FindBugs 插件 http://www.gradle.org/docs/current/userguide/findbugs_plugin.html?我已经寻找解决方案有一段时间了,但到目前为止我还没有找到任何东西......
如果有帮助,这是我现在的脚本。这是一项正在进行的工作,但报告已正确生成。
apply plugin: "findbugs"
task findbugs(type: FindBugs) {
classes = fileTree(project.rootDir.absolutePath).include("**/*.class");
source = fileTree(project.rootDir.absolutePath).include("**/*.java");
classpath = files()
findbugs {
toolVersion = "2.0.3"
ignoreFailures = true
effort = "max"
reportLevel = "low"
reportsDir = file("${projectDir}/reports/findbugs")
sourceSets = [it.sourceSets.main, it.sourceSets.test]
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
}
预先感谢您的任何答复。
我刚刚遇到了同样的问题。我能够按如下方式解决它:
apply plugin: 'findbugs'
dependencies {
// We need to manually set this first, or the plugin is not loaded
findbugs 'com.google.code.findbugs:findbugs:3.0.0'
findbugs configurations.findbugsPlugins.dependencies
// To keep everything tidy, we set these apart
findbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:6.0.0'
}
task findbugs(type: FindBugs) {
// Add all your config here ...
pluginClasspath = project.configurations.findbugsPlugins
}
希望有帮助!
您可以添加更多 Findbugs 插件,只需将它们添加到依赖项下即可findbugsPlugins
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)