-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle.kts
206 lines (174 loc) · 6.77 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
import org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED
import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED
import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
import org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_ERROR
import org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_OUT
import org.gradle.api.tasks.testing.logging.TestLogEvent.STARTED
buildscript {
repositories {
mavenCentral()
maven("https://plugins.gradle.org/m2/")
}
}
val springCloudVersion = "2023.0.3"
plugins {
java
groovy
id("org.springframework.boot") version "3.3.5"
id("io.spring.dependency-management") version "1.1.6"
id("com.gorylenko.gradle-git-properties") version "2.4.2"
id("com.diffplug.spotless") version "6.25.0"
id("io.freefair.lombok") version "8.10.2"
jacoco
}
lombok {
version = "1.18.34"
}
spotless {
java {
target("src/*/java/**/*.java", "src/*/groovy/**/*.java")
removeUnusedImports()
googleJavaFormat()
}
kotlinGradle {
target("*.gradle.kts")
ktlint()
}
groovy {
target("src/*/groovy/**/*.groovy")
removeSemicolons()
}
}
gitProperties {
extProperty = "gitProps" // git properties will be put in a map at project.ext.gitProps
}
apply(from = "./gradle/packaging.gradle.kts")
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
mavenCentral()
maven("https://jitpack.io")
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("org.springframework.boot:spring-boot-starter-aop")
implementation("org.springframework.boot:spring-boot-starter-json")
implementation("org.springframework.boot:spring-boot-starter-validation")
developmentOnly("org.springframework.boot:spring-boot-devtools")
implementation("io.micrometer:micrometer-tracing-bridge-otel")
implementation("com.nimbusds:nimbus-jose-jwt:9.46")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0")
implementation("org.springdoc:springdoc-openapi-starter-common:2.6.0")
implementation("org.springframework.session:spring-session-jdbc")
runtimeOnly("org.postgresql:postgresql")
implementation("io.jsonwebtoken:jjwt-api:0.12.6")
runtimeOnly("io.jsonwebtoken:jjwt-impl:0.12.6")
runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.12.6")
implementation("org.flywaydb:flyway-database-postgresql")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
implementation("org.jsoup:jsoup:1.18.1")
implementation("commons-net:commons-net:3.11.1")
implementation("org.apache.commons:commons-lang3")
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("org.decampo:xirr:1.2")
implementation("org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.4")
implementation("jakarta.xml.bind:jakarta.xml.bind-api:4.0.2")
implementation("ee.sk.smartid:smart-id-java-client:2.3") {
exclude(group = "org.bouncycastle")
}
implementation("ee.sk.mid:mid-rest-java-client:1.5") {
exclude(group = "org.bouncycastle")
}
implementation("org.digidoc4j:digidoc4j:5.3.1") {
exclude(group = "commons-logging", module = "commons-logging")
}
implementation("org.apache.httpcomponents.client5:httpclient5")
implementation("io.sentry:sentry-spring-boot-starter-jakarta:7.16.0")
implementation("io.sentry:sentry-logback:7.16.0")
implementation("io.hypersistence:hypersistence-utils-hibernate-60:3.8.3")
implementation("com.mandrillapp.wrapper.lutung:lutung:0.0.8")
implementation("com.github.ErkoRisthein:mailchimp-transactional-api-java:1.0.59")
implementation("com.github.ErkoRisthein:mailchimp-marketing-api-java:3.0.55")
implementation("jakarta.xml.bind:jakarta.xml.bind-api")
implementation("com.amazonaws:aws-java-sdk-s3:1.12.777")
implementation("commons-io:commons-io:2.17.0")
implementation("org.apache.commons:commons-csv:1.12.0")
testImplementation("com.h2database:h2")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude(module = "spock-core")
exclude(module = "junit-vintage-engine")
}
testImplementation("org.spockframework:spock-core:2.4-M4-groovy-4.0") {
exclude(group = "org.apache.groovy")
}
testImplementation("org.spockframework:spock-spring:2.4-M4-groovy-4.0") {
exclude(group = "org.apache.groovy")
}
testImplementation("org.apache.groovy:groovy-all:4.0.24")
testImplementation("org.mock-server:mockserver-netty:5.15.0")
testImplementation("org.mock-server:mockserver-spring-test-listener:5.15.0")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.mockftpserver:MockFtpServer:3.2.0")
testImplementation("io.github.origin-energy:java-snapshot-testing-spock:4.0.8")
testImplementation("io.github.origin-energy:java-snapshot-testing-plugin-jackson:4.0.8")
testImplementation("io.github.origin-energy:java-snapshot-testing-junit5:4.0.8")
}
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion")
}
}
tasks {
test {
testLogging {
events =
setOf(
STARTED,
PASSED,
FAILED,
SKIPPED,
STANDARD_OUT,
STANDARD_ERROR,
)
showCauses = true
showExceptions = true
showStackTraces = true
exceptionFormat = FULL
}
useJUnitPlatform()
shouldRunAfter(spotlessCheck)
}
bootRun {
systemProperty("file.encoding", "utf-8")
systemProperty("spring.profiles.active", "dev")
}
jacocoTestReport {
dependsOn(test)
reports {
xml.required.set(true)
html.required.set(false)
csv.required.set(false)
}
}
check {
dependsOn(jacocoTestReport)
}
}
tasks.withType<JavaCompile> {
options.compilerArgs.add("-parameters")
options.compilerArgs.add("--enable-preview")
}
tasks.withType<JavaExec> {
jvmArgs("--enable-preview")
}
tasks.withType<Test> {
jvmArgs("--enable-preview")
}