-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
130 lines (105 loc) · 3.92 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
126
127
128
129
130
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.9.25"
kotlin("plugin.spring") version "1.9.25"
kotlin("plugin.serialization") version "2.0.20"
id("org.springframework.boot") version "3.3.5"
id("io.spring.dependency-management") version "1.1.6"
kotlin("plugin.jpa") version "1.9.25"
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
id("org.flywaydb.flyway") version "10.18.0"
}
group = "uk.gov.communities.prsdb"
version = "latest"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
}
dependencies {
// Spring Boot Web
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
implementation("org.springframework.boot:spring-boot-starter-validation")
// Database
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
runtimeOnly("org.postgresql:postgresql")
// Migrations
implementation("org.flywaydb:flyway-core")
implementation("org.flywaydb:flyway-database-postgresql")
// Redis
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.springframework.session:spring-session-data-redis")
// Auth
implementation("org.springframework.boot:spring-boot-starter-oauth2-client")
// Templating
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
implementation("org.thymeleaf.extras:thymeleaf-extras-springsecurity6")
// External service clients
implementation("uk.gov.service.notify:notifications-java-client:5.2.1-RELEASE")
// Development
developmentOnly("org.springframework.boot:spring-boot-devtools")
// Test dependencies
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-testcontainers")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testImplementation("net.sourceforge.htmlunit:htmlunit")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:postgresql")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("com.microsoft.playwright:playwright:1.47.0")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.mockito.kotlin:mockito-kotlin:3.2.0")
testImplementation("com.deque.html.axe-core:playwright:4.4.1")
// Serialization
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.1")
// PhoneNumbers
implementation("com.googlecode.libphonenumber:libphonenumber:8.13.49")
// DateTime
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.1")
// CSV Data Loading
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-csv")
}
kotlin {
compilerOptions {
freeCompilerArgs.addAll("-Xjsr305=strict")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
val frontendAssetsSpec: CopySpec =
copySpec {
from("dist")
include("**/*")
}
tasks.register<Copy>("copyBuiltAssets") {
into(layout.buildDirectory.dir("resources/main/static/assets"))
with(frontendAssetsSpec)
}
tasks.withType<KotlinCompile> {
dependsOn("copyBuiltAssets")
}
tasks.register<JavaExec>("playwright") {
classpath(sourceSets["test"].runtimeClasspath)
mainClass.set("com.microsoft.playwright.CLI")
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.postgresql:postgresql:42.7.4")
classpath("org.flywaydb:flyway-database-postgresql:10.18.0")
}
}