stephanenicolas / Quality-Tools-for-Android

1.27k stars 235 forks source link

Findbugs classpath configuration #25

Open ksarmalkar opened 10 years ago

ksarmalkar commented 10 years ago

For me the findbugs configuration specifically this line

classpath = files( project.configurations.compile.asPath )

is causing issues, I'm trying with android gradle plugin v0.8+ and gradle v1.10

kyhule commented 10 years ago

I am having the same issue. Gradle is complaining it "Could not find com.android.support:support-v13:20.0.0" but I am using the support library with no issues in my project prior to this like.

vanniktech commented 9 years ago

This works for me with Android Studio 1.0.1

apply plugin: 'findbugs'

// android configuration

findbugs {
    sourceSets = []
    ignoreFailures = true
}

task findbugs(type: FindBugs, dependsOn: assembleDebug) {

    description 'Run findbugs'
    group 'verification'

    classes = fileTree('build/intermediates/classes/debug/')
    source = fileTree('src/main/java')
    classpath = files()

    effort = 'max'

    excludeFilter = file("./config/findbugs/exclude.xml")

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

check.doLast {
    project.tasks.getByName("findbugs").execute()
}