作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
module->other->spotbugs 我有一个异常(exception): FAILURE:-6ren">
我想在我的android项目中使用spotbugs,但它失败并出现异常。运行任务:gradle->module->other->spotbugs
我有一个异常(exception):
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':project:spotbugs'.
> No value has been specified for property 'spotbugsClasspath'.
spotbugs.gradle
apply plugin: 'com.github.spotbugs'
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.github.spotbugs:spotbugs-gradle- plugin:1.6.2"
}
}
spotbugs {
toolVersion = "3.1.3"
ignoreFailures = true
effort = 'max'
reportLevel = 'high'
excludeFilter = file("$rootProject.projectDir/rules-findbugs.xml")
}
task spotbugs (type: com.github.spotbugs.SpotBugsTask) {
println 'start spotbugs task'
pluginClasspath = project.configurations.spotbugsPlugins
// spotbugsClasspath = ???
classes = fileTree("$project.buildDir/$classDir")
source = fileTree("$project.projectDir/src/main/java/com/project/")
classpath = files()
reports {
xml.enabled = false
html.enabled = true
html.destination = file("$project.buildDir/outputs/findbugs/findbugs.html")
}
}
最佳答案
需要添加spotbugsClasspath = buildscript.configurations.classpath
关于java - SpotBugs "No value has been specified for property ' SpotbugsClasspath'",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50988333/
我是一名优秀的程序员,十分优秀!