forked from Shantanumajan6/game-of-life
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
56 lines (47 loc) · 1.46 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
apply plugin: 'java'
apply plugin: 'code-quality'
repositories {
mavenCentral()
}
dependencies {
testCompile(
[group: 'junit', name: 'junit', version: '4.8.1'],
[group: 'org.hamcrest', name: 'hamcrest-all', version: '1.1']
)
}
configurations {
[pmd, findbugs]
}
dependencies {
pmd 'pmd:pmd:4.2.5'
findbugs 'com.google.code.findbugs:findbugs:1.3.9'
}
task pmd << {
println 'Running PMD static code analysis'
ant {
taskdef(name: 'pmd', classname: 'net.sourceforge.pmd.ant.PMDTask',
classpath: configurations.pmd.asPath)
taskdef(name: 'cpd', classname: 'net.sourceforge.pmd.cpd.CPDTask',
classpath: configurations.pmd.asPath)
pmd(shortFilenames: 'true', failonruleviolation: 'false',
rulesetfiles: 'conf/pmd-rules.xml') {
formatter(type: 'xml', toFile: 'build/pmd.xml')
fileset(dir: "src/main/java") {
include(name: '**/*.java')
}
fileset(dir: "src/test/java") {
include(name: '**/*.java')
}
}
cpd(minimumTokenCount: '50', format: 'xml',
ignoreIdentifiers: 'true',
outputFile: 'build/cpd.xml') {
fileset(dir: "src/main/java") {
include(name: '**/*.java')
}
fileset(dir: "src/test/java") {
include(name: '**/*.java')
}
}
}
}