FindBugs plugin issue throwing zipException

I can upload a sample project since it will take sometime, but I have found another work around… seems like the previous solution should work… but it doesn’t… So I found a workaround which seems to be working…

def fM = findbugsMain.classes
  fM.exclude '**/*.xml'
  findbugsMain.classes = files(fM.files)

but there is still another problem, in which if I start a clean build, it can not find classes, and complains, and throws following exception

Caused by: org.gradle.api.InvalidUserDataException: Classes must be configured to be analyzed by the Findbugs.

at org.gradle.api.plugins.quality.internal.findbugs.FindBugsSpecBuilder.(FindBugsSpecBuilder.java:41)

at org.gradle.api.plugins.quality.FindBugs.run(FindBugs.groovy:102)

at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:196)

at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:102)

Any clue what is wrong here? these are my tasks…

apply plugin: 'findbugs'
task runFindBugsMain(type:findbugsMain.getClass(), dependsOn:[':build']) {
  def fM = findbugsMain.classes
  fM.exclude '**/*.xml'
  fM.exclude '**/*.conf'
  fM.exclude '**/*.properties'
  fM.exclude '**/*.index'
  findbugsMain.classes = files(fM.files)
  findbugsMain.ignoreFailures = true
}
  task runFindBugsTest(type:findbugsTest.getClass(), dependsOn:[':build']) {
  def
fT = findbugsTest.classes
  fT.exclude '**/*.*'
  fT.exclude '**/*.conf'
  fT.exclude '**/*.properties'
  findbugsTest.classes = files(fT.files)
  findbugsTest.ignoreFailures = true
}