./gradlew app:findbugs
-
-
Save billmote/da89efbddb7ee7699fd2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
apply plugin: 'findbugs' | |
... | |
task findbugs(type: FindBugs, dependsOn: assembleDebug) { | |
excludeFilter file("${project.rootDir}/config/findbugs/exclude.xml") | |
classes = fileTree('build/intermediates/classes/debug/') // Varies based on your app build configs and flavors... | |
source = fileTree('src/main/java/') | |
classpath = files() | |
effort = 'max' | |
reports { | |
xml.enabled = false | |
html.enabled = true | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<FindBugsFilter> | |
<!-- http://stackoverflow.com/questions/7568579/eclipsefindbugs-exclude-filter-files-doesnt-work --> | |
<Match> | |
<Class name="~.*\.R\$.*"/> | |
</Match> | |
<Match> | |
<Class name="~.*\.Manifest\$.*"/> | |
</Match> | |
<!-- All bugs in test classes, except for JUnit-specific bugs --> | |
<Match> | |
<Class name="~.*\.*Test" /> | |
<Not> | |
<Bug code="IJU" /> | |
</Not> | |
</Match> | |
</FindBugsFilter> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment