-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
149 lines (127 loc) · 5.66 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
149 lines (127 loc) · 5.66 KB
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("uk.gov.justice.hmpps.gradle-spring-boot") version "10.3.0"
`jvm-test-suite`
kotlin("plugin.spring") version "2.3.21"
kotlin("plugin.jpa") version "2.3.21"
}
configurations {
testImplementation { exclude(group = "org.junit.vintage") }
}
dependencies {
val kotestVersion = "5.9.1"
val springdocVersion = "3.0.3"
val sentryVersion = "8.41.0"
val jsonWebtokenVersion = "0.13.0"
val springSecurityVersion = "7.0.5"
val flywayVersion = "11.17.1"
runtimeOnly("org.postgresql:postgresql:42.7.11")
implementation("org.flywaydb:flyway-core:$flywayVersion")
implementation("uk.gov.justice.service.hmpps:hmpps-kotlin-spring-boot-starter:2.2.0")
implementation("uk.gov.justice.service.hmpps:hmpps-sqs-spring-boot-starter:7.3.2")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
implementation("org.springframework.boot:spring-boot-starter-oauth2-client")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-flyway")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-csv")
implementation("com.google.guava:guava:33.6.0-jre")
implementation("io.sentry:sentry-spring-boot-4:$sentryVersion")
implementation("io.sentry:sentry-logback:$sentryVersion")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:$springdocVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.11.0")
implementation("org.openfolder:kotlin-asyncapi-spring-web:3.2.2")
implementation("org.apache.tomcat.embed:tomcat-embed-core:11.0.22")
implementation("org.apache.tomcat.embed:tomcat-embed-websocket:11.0.22")
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
testImplementation("com.ninja-squad:springmockk:4.0.2")
testImplementation("io.jsonwebtoken:jjwt-api:$jsonWebtokenVersion")
testImplementation("io.jsonwebtoken:jjwt-impl:$jsonWebtokenVersion")
testImplementation("io.jsonwebtoken:jjwt-orgjson:$jsonWebtokenVersion")
testImplementation("au.com.dius.pact.provider:junit5spring:4.7.1")
testImplementation("org.springframework.security:spring-security-test:$springSecurityVersion")
testImplementation("org.wiremock:wiremock-standalone:3.13.2")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-starter-webclient-test")
testImplementation("org.springframework.boot:spring-boot-starter-webmvc-test")
testImplementation("org.springframework.boot:spring-boot-starter-webflux-test")
testImplementation("org.awaitility:awaitility-kotlin")
testImplementation("org.testcontainers:testcontainers:2.0.5")
testImplementation("org.testcontainers:testcontainers-postgresql:2.0.5")
testImplementation("org.testcontainers:testcontainers-localstack:2.0.5")
testImplementation("org.testcontainers:testcontainers-junit-jupiter:2.0.5")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("uk.gov.justice.service.hmpps:hmpps-subject-access-request-test-support:2.4.2")
testImplementation("uk.gov.justice.service.hmpps:hmpps-kotlin-spring-boot-starter-test:2.2.0")
runtimeOnly("org.flywaydb:flyway-database-postgresql:$flywayVersion")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
}
kotlin {
kotlinDaemonJvmArgs = listOf("-Xmx2g")
jvmToolchain(25)
}
testing {
suites {
val test by getting(JvmTestSuite::class) {
useJUnitJupiter()
targets {
all {
testTask.configure {
// Uncomment this next line if you need to debug tests in CI
// testLogging.showStandardStreams = true
maxParallelForks = 1
environment["pact_do_not_track"] = "true"
val pactProviderTag = System.getenv("PACT_PROVIDER_TAG")
val pactProviderVersion = System.getenv("PACT_PROVIDER_VERSION")
if (pactProviderTag != null && pactProviderVersion != null) {
environment["pact.provider.tag"] = pactProviderTag
environment["pact.provider.version"] = pactProviderVersion
environment["pact.verifier.publishResults"] =
System.getenv("PACT_PUBLISH_RESULTS") ?: "false"
}
}
}
}
}
}
}
tasks {
withType<KotlinCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_25)
}
kotlin.sourceSets["main"].kotlin.srcDir(layout.buildDirectory.dir("generated/src/main/kotlin"))
kotlin.sourceSets["main"].kotlin.srcDir(layout.buildDirectory.dir("generated/src/main/resources"))
}
register("bootRunLocal") {
group = "application"
description = "Runs this project as a Spring Boot application with the local profile"
doFirst {
bootRun.configure {
systemProperty("spring.profiles.active", "local,dev,seed")
}
}
finalizedBy("bootRun")
}
}
ktlint {
filter {
val openApiGeneratedSrcPath = layout.buildDirectory.dir("generated").get().asFile.path
exclude { it.file.startsWith(openApiGeneratedSrcPath) }
}
}
allOpen {
annotations(
"jakarta.persistence.Entity",
"jakarta.persistence.MappedSuperclass",
"jakarta.persistence.Embeddable",
)
}