generated from Health-Education-England/tis-microservice-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
108 lines (87 loc) · 3.07 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
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
plugins {
java
alias(libs.plugins.spring.boot)
alias(libs.plugins.spring.dependency.management)
// Code quality plugins
checkstyle
jacoco
alias(libs.plugins.sonarqube)
}
group = "uk.nhs.hee.tis.trainee"
version = "1.20.1"
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
}
dependencyManagement {
imports {
mavenBom(libs.spring.cloud.dependencies.aws.get().toString())
mavenBom(libs.spring.cloud.dependencies.core.get().toString())
}
}
dependencies {
// Spring Boot starters
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("org.springframework.boot:spring-boot-starter-data-redis")
testImplementation("org.springframework.boot:spring-boot-starter-test")
// Lombok
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
// MapStruct
implementation(libs.mapstruct.core)
annotationProcessor(libs.mapstruct.processor)
testAnnotationProcessor(libs.mapstruct.processor)
// Sentry reporting
implementation(libs.sentry.core)
// Required to support PATCH requests.
implementation("org.apache.httpcomponents.client5:httpclient5")
// Amazon
implementation("io.awspring.cloud:spring-cloud-aws-starter-sqs")
implementation("io.awspring.cloud:spring-cloud-aws-starter-sns")
implementation("org.springframework.cloud:spring-cloud-starter-bootstrap")
implementation(libs.bundles.mongock)
testImplementation("org.springframework.cloud:spring-cloud-starter")
testImplementation("org.springframework.cloud:spring-cloud-contract-wiremock")
testImplementation("org.testcontainers:testcontainers")
testImplementation("org.testcontainers:junit-jupiter")
val playtikaTestContainersVersion = "3.1.7"
testImplementation("com.playtika.testcontainers:embedded-redis:${playtikaTestContainersVersion}")
testImplementation("com.playtika.testcontainers:embedded-mongodb:${playtikaTestContainersVersion}")
}
checkstyle {
config = resources.text.fromArchiveEntry(configurations.checkstyle.get().first(), "google_checks.xml")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
vendor.set(JvmVendorSpec.ADOPTIUM)
}
}
sonarqube {
properties {
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.login", System.getenv("SONAR_TOKEN"))
property("sonar.organization", "health-education-england")
property("sonar.projectKey", "Health-Education-England_tis-trainee-sync")
property("sonar.java.checkstyle.reportPaths",
"build/reports/checkstyle/main.xml,build/reports/checkstyle/test.xml")
}
}
tasks.jacocoTestReport {
reports {
html.required.set(true)
xml.required.set(true)
}
}
tasks.test {
finalizedBy(tasks.jacocoTestReport)
useJUnitPlatform()
}