apply plugin: 'findbugs'

check.dependsOn 'findbugs'
task findbugs(type: FindBugs, dependsOn: ['compileDebugJava', 'compileDebugTestJava']) {
    ignoreFailures = true
    classes = fileTree('build/intermediates/classes/debug/') +
            fileTree('build/intermediates/classes/test/debug/')
    source = project.android.sourceSets.main.java.getSrcDirs() +
            project.android.sourceSets.androidTest.java.getSrcDirs()
    classpath = files()
    effort = 'max'
    includeFilter = file("$rootProject.projectDir/config/findbugs/include_filter.xml")
    excludeFilter = file("$rootProject.projectDir/config/findbugs/exclude_filter.xml")
}
