Reputation: 1443
Error message:
No files to be analyzed
My findbugs configuration is like:
tasks.create([ "type" : FindBugs, "dependsOn" : "assemble", "group": "verification", "name": "findbugs"]) {
classes = files("$projectDir.absolutePath/build/intermediates/classes")
source = fileTree('src/main/java')
classpath = files()
}
Upvotes: 4
Views: 1024
Reputation: 99
Just change the classes path in file findbugs.gradle from classes = fileTree("$project.buildDir/intermediates/classes/dev/debug/com/android"
to classes = fileTree("$project.buildDir/intermediates/javac/debug/compileDebugJavaWithJavac/classes/android"
.
Upvotes: 0
Reputation: 21
task findbugs(type: FindBugs) {
ignoreFailures = true
classes = files("${project.rootDir}/app/build/intermediates/javac",
"${project.rootDir}/database/build/intermediates/javac",
"${project.rootDir}/dataprovider/build/intermediates/javac")
source = fileTree('app/src/main/java/')
classpath = files()
reports {
html.enabled = true
xml.enabled = false
}
}
Upvotes: 2
Reputation: 1443
Seems like the class path have changed in AGP 3.2 from build/intermediates/classes
to build/intermediates/javac
.
Upvotes: 13