Robertoq
(robert.gyerak)
July 3, 2014, 11:12am
1
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
}
}
Robertoq
(robert.gyerak)
July 4, 2014, 10:42am
3
I tried it and i don’t get reports
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.
Robertoq
(robert.gyerak)
July 4, 2014, 11:14am
5
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?
Robertoq
(robert.gyerak)
July 4, 2014, 7:50pm
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.