-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
86 lines (69 loc) · 1.59 KB
/
build.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
def project_id = '### insert here ###'
apply plugin: 'java'
apply plugin: 'pmd'
apply plugin: 'findbugs'
apply plugin: 'checkstyle'
sourceSets {
main {
java {
srcDir 'src'
}
resources {
srcDir 'resources'
}
}
}
repositories {
jcenter()
}
tasks.withType(JavaCompile) {
options.encoding = 'ISO8859-15'
}
dependencies {
compile 'junit:junit:4.12'
checkstyle 'com.puppycrawl.tools:checkstyle:7.6.1'
}
pmd {
ignoreFailures = true
toolVersion = '5.5.5'
ruleSetFiles = files('pmd-ruleset.xml')
}
tasks.withType(Pmd) {
reports {
xml.enabled = true
html.enabled = false
}
}
findbugs {
ignoreFailures = true
effort = 'max'
reportLevel = 'low'
toolVersion = '3.0.1'
}
tasks.withType(FindBugs) {
reports {
xml.enabled = true
xml.withMessages = true
xml.destination = new StringBuilder().append('report/FindBugs').append(project_id).append('.xml').toString() as File
}
}
checkstyle {
toolVersion = '7.6.1'
ignoreFailures = true
configFile = 'checkstyle.xml' as File
}
tasks.withType(Checkstyle) {
reports {
xml.destination = new StringBuilder().append('report/CheckStyle').append(project_id).append('.xml').toString() as File
}
}
task copyPmd(type: Copy) {
from('build/reports/pmd/main.xml')
into(new StringBuilder().append('report'))
rename {
String fileName -> new StringBuilder().append('PMD').append(project_id).append('.xml').toString()
}
}
task qualityReview() {
dependsOn += ['check', 'copyPmd']
}