forked from WPISoftEng/CS3733-Starter-Code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
99 lines (84 loc) · 2.02 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 'com.diffplug.gradle.spotless' version '3.27.1'
id "io.freefair.lombok" version "5.0.0-rc6"
}
mainClassName = 'edu.wpi.teamname.Main'
repositories {
mavenCentral()
jcenter()
maven {
url 'https://apisite.crmyers.dev/maven'
}
}
dependencies {
implementation(
'com.jfoenix:jfoenix:8.0.10',
// You may comment out the database dependency you do not use
'org.xerial:sqlite-jdbc:3.30.1',
'org.apache.derby:derby:10.14.2.0',
'org.slf4j:slf4j-api:1.7.30',
'org.slf4j:slf4j-simple:1.7.30',
)
testCompile(
"org.testfx:testfx-core:4.0.16-alpha",
'org.junit.jupiter:junit-jupiter:5.6.0',
'org.testfx:testfx-junit5:4.0.16-alpha',
)
}
test {
useJUnitPlatform()
}
jar {
manifest {
attributes 'Main-Class': mainClassName
}
}
def codeCoverageExcludes = [
'edu.wpi.teamname.App',
'edu.wpi.teamname.Main',
]
jacoco {
toolVersion = "0.8.4"
}
jacocoTestCoverageVerification {
violationRules {
rule {
element = 'CLASS'
limit {
counter = 'CLASS'
value = 'COVEREDRATIO'
minimum = 1.0
}
excludes = codeCoverageExcludes
}
rule {
element = 'CLASS'
limit {
counter = 'LINE'
value = 'COVEREDRATIO'
minimum = 0.25
}
excludes = codeCoverageExcludes
}
rule {
element = 'CLASS'
limit {
counter = 'BRANCH'
value = 'COVEREDRATIO'
minimum = 0.25
}
excludes = codeCoverageExcludes
}
}
}
check.dependsOn jacocoTestCoverageVerification
jacocoTestCoverageVerification.dependsOn jacocoTestReport
compileJava.dependsOn 'spotlessApply'
spotless {
java {
googleJavaFormat()
}
}