-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
53 lines (47 loc) · 1.6 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
plugins {
id 'java'
id 'jacoco'
id 'org.springframework.boot' version '3.0.6'
id 'io.spring.dependency-management' version '1.1.0'
}
group = 'dev.francisco.briceno'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'mysql:mysql-connector-java:8.0.27'
testImplementation 'com.h2database:h2'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
}
tasks.named('test') {
finalizedBy jacocoTestReport
useJUnitPlatform()
}
jacocoTestReport {
dependsOn test
reports {
// Can consume xml for automation
xml.required = true;
// And html for visual
html.required = true;
}
// Clean the report - don't look at coverage on dtos, configs or models
afterEvaluate {
classDirectories.from = files(classDirectories.files.collect {
fileTree(
dir: it,
exclude: [
'dev/francisco/briceno/prisongame/domain/*',
'dev/francisco/briceno/prisongame/dto/*',
'dev/francisco/briceno/prisongame/repository/*',
'dev/francisco/briceno/prisongame/PrisonGameApplication.class', ])
})
}
}