-
Notifications
You must be signed in to change notification settings - Fork 85
/
quality.gradle
68 lines (55 loc) · 1.58 KB
/
quality.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
apply plugin: 'pmd'
apply plugin: 'findbugs'
apply plugin: 'checkstyle'
pmd {
ruleSetFiles = files("${project.rootDir}/config/pmd/pmd-ruleset.xml")
}
findbugs {
includeFilter = file("${project.rootDir}/config/findbugs/findbugs-config.xml")
excludeFilter = file("${project.rootDir}/config/findbugs/findbugs-excludes.xml")
}
checkstyle {
toolVersion = "6.16"
}
android.lintOptions {
abortOnError true
lintConfig file("${project.rootDir}/config/lint/lint.xml")
textReport "true".equals(System.getenv("TRAVIS"))
textOutput 'stdout'
}
task pmd(type: Pmd) {
description 'Run pmd'
group 'verification'
source = fileTree('src/main/java')
consoleOutput = true
ignoreFailures = false
reports {
xml.enabled = false
html.enabled = true
}
}
task findbugs(type: FindBugs, dependsOn: assemble) {
description 'Run findbugs'
group 'verification'
classes = fileTree('build/intermediates/classes/')
source = fileTree('src/main/java/')
classpath = files()
includeFilter = file("$rootProject.projectDir/config/findbugs/findbugs-config.xml")
excludeFilter = file("$rootProject.projectDir/config/findbugs/findbugs-excludes.xml")
ignoreFailures = false
reports {
xml.enabled = false
html.enabled = true
}
}
task checkstyle(type: Checkstyle) {
description 'Run checkstyle'
group 'verification'
configFile file("${project.rootDir}/config/checkstyle/checkstyle.xml")
configProperties = [rootDir: "${project.rootDir}"]
source 'src'
include '**/*.java'
exclude '**/gen/**'
classpath = files()
}
check.dependsOn 'checkstyle', 'findbugs', 'pmd', 'lint'