-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
66 lines (56 loc) · 1.78 KB
/
build.gradle.kts
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
plugins {
java
id("org.springframework.boot") version "3.2.5"
id("io.spring.dependency-management") version "1.1.4"
id("org.sonarqube") version "4.2.1.3168"
//id("org.sonarqube") version "4.3.1.3277"
jacoco
}
group = "de.cofinpro"
version = "0.0.1-SNAPSHOT"
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
xml.required.set(true)
}
}
val sonarToken: String by project
sonar {
properties {
property("sonar.token", sonarToken)
property("sonar.projectKey", "expenses-splitter")
property("sonar.projectName", "expenses-splitter")
property("sonar.jacoco.reportPaths", "build/reports/jacoco")
property("sonar.junit.reportPaths", "build/test-results/test")
property("sonar.host.url", "http://localhost:9000")
}
}
tasks.sonar {
dependsOn(tasks.jacocoTestReport)
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-validation")
compileOnly("org.projectlombok:lombok")
developmentOnly("org.springframework.boot:spring-boot-devtools")
runtimeOnly("com.h2database:h2")
annotationProcessor("org.projectlombok:lombok")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.mockito:mockito-inline:5.2.0")
}
tasks.named("compileJava") {
inputs.files(tasks.named("processResources"))
}
tasks.named<Test>("test") {
useJUnitPlatform()
}