FindBugs not generate reports

(robert.gyerak) #1


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.

(Todd Gerspacher) #2

The following worked for me:

 ignoreFailures = true
   reports {
  xml.enabled = false
  html.enabled = true

(robert.gyerak) #3

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

(Todd Gerspacher) #4

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.

(robert.gyerak) #5

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

(Todd Gerspacher) #6

Did you also apply the Java plugin?

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

(robert.gyerak) #7

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.