forked from TUM-Dev/Campus-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfindbugs.gradle
27 lines (24 loc) · 988 Bytes
/
findbugs.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
apply plugin: 'findbugs'
afterEvaluate {
def variants = plugins.hasPlugin('com.android.application') ?
android.applicationVariants : android.libraryVariants
variants.each { variant ->
def task = tasks.create("findBugs${variant.name.capitalize()}", FindBugs) {
group = 'verification'
description = "Run FindBugs for the ${variant.description}."
ignoreFailures = true
effort = 'max'
reports {
xml.enabled = true
html.enabled = false
}
def variantCompile = variant.javaCompile
classes = fileTree(variantCompile.destinationDir)
source = variantCompile.source
classpath = variantCompile.classpath.plus(project.files(android.bootClasspath))
dependsOn(variantCompile)
excludeFilter = new File("../excludeBugsFilter.xml")
}
tasks.getByName('check').dependsOn(task)
}
}