forked from itsnotelena/jpacman-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
99 lines (83 loc) · 2.01 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
plugins {
id 'application'
id 'java'
id 'jacoco'
id 'checkstyle'
id 'pmd'
id 'com.github.spotbugs' version '1.7.1'
}
sourceSets {
defaultTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/default-test/java')
}
resources.srcDir file('src/default-test/resources')
}
}
configurations {
defaultTestCompile.extendsFrom testCompile
defaultTestImplementation.extendsFrom testImplementation
defaultTestRuntime.extendsFrom testRuntime
}
repositories {
mavenCentral()
}
dependencies {
compile "com.google.guava:guava:$guavaVersion"
compileOnly "com.github.spotbugs:spotbugs-annotations:$spotbugsAnnotationsVersion"
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
testCompile "org.mockito:mockito-core:$mockitoVersion"
testCompile "org.assertj:assertj-core:$assertjVersion"
}
task defaultTest(type: Test) {
testClassesDirs = sourceSets.defaultTest.output.classesDirs
classpath = sourceSets.defaultTest.runtimeClasspath
}
test.dependsOn defaultTest
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
defaultTest {
useJUnitPlatform()
}
jacoco {
toolVersion = jacocoVersion
}
jacocoTestReport {
executionData tasks.withType(Test)
reports {
csv.enabled true
}
}
checkstyle {
configFile file("checkstyle.xml")
ignoreFailures = false
}
pmd {
ruleSetFiles "pmd-rules.xml"
ruleSets = []
}
tasks.withType(com.github.spotbugs.SpotBugsTask) {
reports {
xml.enabled = false
html.enabled = true
}
}
task staticAnalysis(type: GradleBuild) {
tasks = [
'clean',
'checkstyleMain',
'checkstyleTest',
'checkstyleDefaultTest',
'pmdMain',
'pmdTest',
'pmdDefaultTest',
'spotbugsMain',
'spotbugsTest',
'spotbugsDefaultTest',
]
}
mainClassName = 'nl.tudelft.jpacman.Launcher'