generated from ministryofjustice/hmpps-template-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
125 lines (102 loc) · 4.48 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import uk.gov.justice.digital.hmpps.gradle.PortForwardRDSTask
import uk.gov.justice.digital.hmpps.gradle.PortForwardRedisTask
import uk.gov.justice.digital.hmpps.gradle.RevealSecretsTask
plugins {
id("uk.gov.justice.hmpps.gradle-spring-boot") version "6.0.4"
kotlin("plugin.jpa") version "2.0.20"
kotlin("plugin.spring") version "2.0.20"
id("org.springdoc.openapi-gradle-plugin") version "1.9.0"
id("jacoco")
id("org.sonarqube") version "5.1.0.4882"
}
dependencyCheck {
suppressionFiles.add("reactive-suppressions.xml")
// Please remove the below suppressions once it has been suppressed in the DependencyCheck plugin (see this issue: https://github.com/jeremylong/DependencyCheck/issues/4616)
suppressionFiles.add("postgres-suppressions.xml")
}
configurations {
implementation { exclude(module = "spring-boot-starter-web") }
implementation { exclude(module = "spring-boot-starter-tomcat") }
testImplementation { exclude(group = "org.junit.vintage") }
}
repositories {
maven { url = uri("https://repo.spring.io/milestone") }
mavenCentral()
}
dependencies {
implementation("uk.gov.justice.service.hmpps:hmpps-kotlin-spring-boot-starter:1.0.5")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springframework.boot:spring-boot-starter-data-r2dbc")
implementation("uk.gov.justice.service.hmpps:hmpps-sqs-spring-boot-starter:4.3.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
runtimeOnly("org.flywaydb:flyway-database-postgresql")
runtimeOnly("org.postgresql:r2dbc-postgresql")
runtimeOnly("org.springframework.boot:spring-boot-starter-jdbc")
runtimeOnly("org.postgresql:postgresql")
// Shedlock dependencies
implementation("net.javacrumbs.shedlock:shedlock-spring:5.16.0")
implementation("net.javacrumbs.shedlock:shedlock-provider-r2dbc:5.16.0")
implementation("org.springdoc:springdoc-openapi-starter-webflux-ui:2.6.0")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
implementation("io.opentelemetry:opentelemetry-api:1.42.0")
implementation("io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.7.0")
implementation("org.apache.commons:commons-lang3")
implementation("org.apache.commons:commons-text:1.12.0")
implementation("commons-codec:commons-codec")
implementation("com.google.code.gson:gson")
implementation("com.pauldijou:jwt-core_2.11:5.0.0")
developmentOnly("org.springframework.boot:spring-boot-devtools")
testImplementation("uk.gov.justice.service.hmpps:hmpps-kotlin-spring-boot-starter-test:1.0.5")
testImplementation("org.awaitility:awaitility-kotlin")
testImplementation("org.mockito:mockito-inline:5.2.0")
testImplementation("io.swagger.parser.v3:swagger-parser:2.1.22")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.wiremock:wiremock-standalone:3.9.1")
testImplementation("org.testcontainers:localstack:1.20.1")
testImplementation("org.testcontainers:postgresql:1.20.1")
testImplementation("io.projectreactor:reactor-test")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test")
testImplementation("javax.xml.bind:jaxb-api:2.3.1")
testImplementation("io.opentelemetry:opentelemetry-sdk:1.42.0")
testImplementation("io.opentelemetry:opentelemetry-sdk-common:1.42.0")
testImplementation("io.opentelemetry:opentelemetry-sdk-metrics:1.42.0")
testImplementation("io.opentelemetry:opentelemetry-sdk-testing:1.42.0")
if (project.hasProperty("docs")) {
implementation("com.h2database:h2")
}
}
openApi {
outputDir.set(layout.buildDirectory.dir("docs"))
outputFileName.set("openapi.json")
customBootRun.args.set(listOf("--spring.profiles.active=dev,localstack,docs"))
}
kotlin {
jvmToolchain(21)
}
tasks {
register<PortForwardRDSTask>("portForwardRDS") {
namespacePrefix = "hmpps-incentives"
}
register<PortForwardRedisTask>("portForwardRedis") {
namespacePrefix = "hmpps-incentives"
}
register<RevealSecretsTask>("revealSecrets") {
namespacePrefix = "hmpps-incentives"
}
withType<KotlinCompile> {
compilerOptions.jvmTarget = JvmTarget.JVM_21
}
test {
finalizedBy(jacocoTestReport)
}
jacocoTestReport {
dependsOn(test)
reports {
xml.required.set(true)
}
}
}