-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
146 lines (112 loc) · 3.13 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// In this section you declare where to find the dependencies of your project
allprojects {
group = 'org.victoryw'
version = '0.1.0'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
task wrapper(type: Wrapper) {
gradleVersion = '3.5'
}
checkstyle {
configFile = rootProject.file('checkstyle.xml')
toolVersion ="7.0"
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
jacoco {
// change the version of Jacoco in use
toolVersion = '0.7.9'
}
}
buildscript {
ext {
springBootVersion = '1.4.2.RELEASE'
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.1.11'
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'application'
apply plugin: "info.solidsoft.pitest"
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
}
dependencies {
// Start: Spring Boot Web
compile('org.springframework.boot:spring-boot-starter-web')
// End: Spring Boot Web
//Start: Spring data jpa and H2 memory db
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile 'mysql:mysql-connector-java'
//End: Spring data jpa and H2 memory db
compile 'org.victoryw.idGenerator:IDGenerator:1.2'
//Start: Pact
testCompile 'au.com.dius:pact-jvm-consumer-junit_2.11:3.5.0-rc.3'
testCompile 'au.com.dius:pact-jvm-provider-junit_2.11:3.5.0-rc.3'
//End: Pact
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("com.h2database:h2")
// Start: JUnit
testCompile 'junit:junit:4.12'
// End: JUnit
}
jacoco {
reportsDir = file("$buildDir/customJacocoReportDir")
}
test {
jacoco {
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
classDumpDir = file("$buildDir/jacoco/classpathdumps")
}
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${buildDir}/jacocoHtml"
}
}
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.99
}
}
}
}
}
project(':consumer') {
mainClassName = 'org.victoryw.ConsumerMain'
}
task codeCoverageReport(type: JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
subprojects.each {
sourceSets it.sourceSets.main
}
reports {
xml.enabled true
xml.destination "${buildDir}/reports/jacoco/report.xml"
html.enabled false
csv.enabled false
}
}
codeCoverageReport.dependsOn {
subprojects*.test
}