FindBugs not generate reports

Hi!

I try add the FingBugs into my project:

apply plugin: 'findbugs'
tasks.withType(FindBugs) {
    ignoreFailures = true
    reports {
        html { enabled = true }
        xml.enabled = !html.enabled
    }
}

but the “gradlwe check” not generating findbugs reports. I added some “bug” into project so must be find bugs. What is the problem?

I’m using 1.10 gradle.

The following worked for me:

tasks.withType(FindBugs){
 ignoreFailures = true
   reports {
  xml.enabled = false
  html.enabled = true
 }
}

I tried it and i don’t get reports :frowning:

When you do gradle check, is it running the findbugsMain and findbugsTest tasks?

I’m using Gradle 1.10 and what I gave you worked for me. So I don’t know what’s wrong.

I checked console output and the findbugs task is missing from the list. Are there any other configs after apply plugin: ‘findbugs’?

Did you also apply the Java plugin?

Do you have the proper project layout, with Java files in the folder src/main/java?

It is an android project, so when i add java plugin i get this error: “Error:The ‘java’ plugin has been applied, but it is not compatible with the Android plugins.”

Yes, the java files are under src/main/java folder.