-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
73 lines (63 loc) · 2.22 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
plugins {
id "java"
id "org.springframework.boot" version "2.1.7.RELEASE"
id "idea"
id "pmd"
id "jacoco"
}
group 'sample.myretail'
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
dependencies {
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.1.7.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-mongodb', version:'2.1.7.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-cache', version: '2.1.7.RELEASE'
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-hystrix', version: '2.1.2.RELEASE'
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.6'
compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.9.2'
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.28.2'
testCompile group: 'org.powermock', name: 'powermock-api-mockito2', version: '2.0.2'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.1.7.RELEASE'
}
jacoco {
toolVersion = "0.8.0"
reportsDir = file("$buildDir/reports")
}
jacocoTestCoverageVerification {
violationRules {
// See http://www.eclemma.org/jacoco/trunk/doc/counters.html for a description of the counters
rule {
limit {
counter = 'LINE'
minimum = 0.6
}
}
rule {
limit {
counter = 'METHOD'
minimum = 0.7
}
}
rule {
limit {
counter = 'CLASS'
minimum = 0.8
}
}
}
}
pmd {
// Without specifying a version PMD was throwing parse errors on the lambda expressions.
toolVersion = "6.1.0"
sourceSets = [sourceSets.main]
}
pmdMain {
ruleSetFiles = files("pmd-ruleset.xml")
// Empty the ruleSets to execute the custom "pmd-ruleset.xml"
ruleSets = []
}
test.finalizedBy jacocoTestCoverageVerification, jacocoTestReport