原因为使用了querydsl , 需要在几个task里添加一句内容 sourceSets = [sourceSets.main]
pmd {
consoleOutput = true
ignoreFailures = true
ruleSets = [
"java-ali-comment"
, "java-ali-concurrent"
, "java-ali-constant"
, "java-ali-exception"
, "java-ali-flowcontrol"
, "java-ali-naming"
, "java-ali-oop"
, "java-ali-orm"
, "java-ali-other"
, "java-ali-set"
]
sourceSets = [sourceSets.main] 加上这一条
}
spotbugs {
ignoreFailures = true
excludeFilter = file("$rootDir/gradle/spotbugs/exclude.xml")
sourceSets = [sourceSets.main] 加上这一条
}
checkstyle {
configFile = new File("${rootProject.projectDir}/gradle/checkstyle/" + System.getProperty("checkstyle.type", "complex") + ".xml")
ignoreFailures = true
sourceSets = [sourceSets.main] 加上这一条
}