-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
72 lines (61 loc) · 2.07 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
plugins {
id "org.sonarqube" version "5.0.0.4638"
id 'org.springframework.boot' version '3.3.2'
id 'io.spring.dependency-management' version '1.1.6'
id 'java'
id 'jacoco'
}
sonarqube {
properties {
property "sonar.projectKey", "FloodRisk"
property "sonar.host.url", "http://localhost:9000"
property "sonar.token", "sqp_b2daf5f693ad2ac6a9a46f1acb57757efc37dcd2"
property "sonar.junit.reportPaths", "build/test-results/test"
}
}
jacoco {
toolVersion = '0.8.8'
}
group = 'com.hackathon'
version = '1.0.1-SNAPSHOT'
java.sourceCompatibility = '17'
bootRun {
environment SPRING_PROFILES_ACTIVE: environment.SPRING_PROFILES_ACTIVE ?: 'dev'
}
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-mongodb')
implementation('io.github.wimdeblauwe:error-handling-spring-boot-starter:4.3.0')
implementation('org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0')
compileOnly('org.projectlombok:lombok')
annotationProcessor('org.projectlombok:lombok')
testCompileOnly('org.projectlombok:lombok')
testAnnotationProcessor('org.projectlombok:lombok')
developmentOnly('org.springframework.boot:spring-boot-devtools')
implementation 'org.junit.jupiter:junit-jupiter:5.10.2'
implementation 'org.mockito:mockito-junit-jupiter:5.11.0'
testImplementation 'org.mockito:mockito-core:5.11.0'
testImplementation 'org.mockito:mockito-junit-jupiter:5.11.0'
testImplementation('org.springframework.boot:spring-boot-starter-test')
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
reports {
junitXml.destination = file("${buildDir}/test-results/test")
html.destination = file("${buildDir}/reports/tests/test")
}
}
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}
tasks.withType(Test) {
useJUnitPlatform()
}