generated from ministryofjustice/hmpps-template-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
62 lines (51 loc) · 1.66 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
plugins {
id("uk.gov.justice.hmpps.gradle-spring-boot") version "6.1.2"
kotlin("plugin.spring") version "2.0.21"
kotlin("plugin.jpa") version "2.0.21"
jacoco
idea
}
configurations {
testImplementation { exclude(group = "org.junit.vintage") }
}
dependencies {
// Spring Boot
implementation("uk.gov.justice.service.hmpps:hmpps-kotlin-spring-boot-starter:1.1.1")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
// OpenAPI
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.3")
// UUIDs
implementation("com.fasterxml.uuid:java-uuid-generator:5.1.0")
// Database
runtimeOnly("com.zaxxer:HikariCP")
runtimeOnly("org.flywaydb:flyway-database-postgresql")
runtimeOnly("org.postgresql:postgresql")
// Test
testImplementation("uk.gov.justice.service.hmpps:hmpps-kotlin-spring-boot-starter-test:1.1.1")
testImplementation("org.testcontainers:junit-jupiter:1.20.4")
testImplementation("org.testcontainers:postgresql:1.20.4")
testImplementation("io.mockk:mockk:1.13.16")
testImplementation("org.wiremock:wiremock-standalone:3.10.0")
testImplementation("io.swagger.parser.v3:swagger-parser:2.1.25") {
exclude(group = "io.swagger.core.v3")
}
}
kotlin {
jvmToolchain(21)
}
tasks {
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
compilerOptions.jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21
}
}
// Jacoco code coverage
tasks.named("test") {
finalizedBy("jacocoTestReport")
}
tasks.named<JacocoReport>("jacocoTestReport") {
reports {
html.required.set(true)
xml.required.set(true)
}
}