-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
132 lines (115 loc) · 3.96 KB
/
build.gradle.kts
File metadata and controls
132 lines (115 loc) · 3.96 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
plugins {
java
jacoco
id("com.diffplug.spotless") version "8.4.0"
id("io.freefair.lombok") version "9.2.0"
id("io.sentry.jvm.gradle") version "6.4.0"
id("io.spring.dependency-management") version "1.1.7"
id("org.springframework.boot") version "4.0.5"
id("org.unbroken-dome.test-sets") version "4.1.0"
}
group = "hu.bsstudio"
version = resolveVersion()
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
}
dependencies {
implementation("com.github.ben-manes.caffeine:caffeine:3.2.3")
implementation("com.itextpdf:itext-core:9.6.0")
implementation("org.mapstruct:mapstruct:1.6.3")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.3")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-flyway")
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-web")
developmentOnly("org.springframework.boot:spring-boot-devtools")
runtimeOnly("org.flywaydb:flyway-database-postgresql:12.4.0")
runtimeOnly("org.postgresql:postgresql:42.7.10")
annotationProcessor("org.mapstruct:mapstruct-processor:1.6.3")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.testcontainers:testcontainers:2.0.4")
testImplementation("org.testcontainers:testcontainers-postgresql:2.0.4")
testImplementation("io.rest-assured:rest-assured:6.0.0")
testImplementation("org.wiremock:wiremock-standalone:3.13.2")
testImplementation("com.nimbusds:nimbus-jose-jwt:10.9")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
springBoot {
buildInfo()
}
testSets.create("integrationTest")
tasks {
withType<Test> {
useJUnitPlatform()
finalizedBy(jacocoTestReport)
}
jar {
enabled = false
}
val integrationTest = getByName<Test>("integrationTest") {
maxHeapSize = "1G"
shouldRunAfter(test)
finalizedBy(jacocoTestReport)
}
check {
dependsOn(integrationTest)
}
jacocoTestReport {
executionData(integrationTest)
dependsOn(integrationTest)
reports {
xml.required.set(true)
}
classDirectories.setFrom(files(classDirectories.files.map {
fileTree(it) {
exclude(
"**/hu/bsstudio/raktr/**/*MapperImpl.class",
"**/hu/bsstudio/raktr/**/*MapperImpl$*.class",
"**/hu/bsstudio/raktr/security/Sentry*.class",
"**/hu/bsstudio/raktr/RaktrApplication.class"
)
}
}))
}
}
tasks.compileJava {
options.compilerArgs.addAll(
listOf(
"-Amapstruct.defaultComponentModel=spring",
"-Amapstruct.unmappedTargetPolicy=ERROR"
)
)
}
envOrProperty("SENTRY_AUTH_TOKEN", "sentryAuthToken")?.let { token ->
sentry {
includeSourceContext.set(true)
org.set("budavari-schonherz-studio")
projectName.set("raktr-backend-prod")
authToken.set(token)
}
}
spotless {
java {
importOrder("", "javax|java", "\\#")
removeUnusedImports()
expandWildcardImports()
trimTrailingWhitespace()
endWithNewline()
}
}