-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
133 lines (108 loc) · 3.89 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
plugins {
val kotlinVersion = "1.9.10"
id("org.springframework.boot") version "3.1.4"
id("io.spring.dependency-management") version "1.1.3"
kotlin("jvm") version kotlinVersion
kotlin("kapt") version kotlinVersion
kotlin("plugin.spring") version kotlinVersion
}
group = "com.leijendary.spring"
version = "1.0.0"
description = "Spring Boot WebSocket Template for the Microservice Architecture or general purpose"
java {
sourceCompatibility = JavaVersion.VERSION_20
}
kotlin {
compilerOptions {
apiVersion.set(KotlinVersion.KOTLIN_2_0)
freeCompilerArgs.addAll("-Xjsr305=strict", "-Xjvm-default=all", "-Xjvm-enable-preview")
languageVersion.set(KotlinVersion.KOTLIN_2_0)
jvmTarget.set(JvmTarget.JVM_20)
}
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
testImplementation {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
}
}
repositories {
mavenCentral()
}
kapt {
arguments {
arg("mapstruct.unmappedTargetPolicy", "IGNORE")
}
javacOptions {
option("--enable-preview")
}
}
dependencies {
// Kotlin
implementation(kotlin("reflect"))
implementation(kotlin("stdlib-jdk8"))
testImplementation(kotlin("test"))
// Spring Boot Starter
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-aop")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springframework.boot:spring-boot-starter-websocket")
// Spring Test
testImplementation("org.springframework.boot:spring-boot-starter-test")
// Spring Security
implementation("org.springframework.security:spring-security-web")
implementation("org.springframework.security:spring-security-oauth2-jose")
testImplementation("org.springframework.security:spring-security-test")
// Spring Retry
implementation("org.springframework.retry:spring-retry")
// Spring Kafka
implementation("org.springframework.kafka:spring-kafka")
testImplementation("org.springframework.kafka:spring-kafka-test")
// Devtools
developmentOnly("org.springframework.boot:spring-boot-devtools")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
// Jackson
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
// MapStruct
implementation("org.mapstruct:mapstruct:1.5.5.Final")
kapt("org.mapstruct:mapstruct-processor:1.5.5.Final")
testImplementation("org.mapstruct:mapstruct-processor:1.5.5.Final")
// OpenAPI
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0")
// Tracing
implementation("com.github.loki4j:loki-logback-appender:1.4.1")
implementation("io.micrometer:micrometer-registry-prometheus")
implementation("io.micrometer:micrometer-tracing-bridge-otel")
implementation("io.opentelemetry:opentelemetry-exporter-otlp")
// Test
testImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0")
testImplementation("org.mockito:mockito-inline:5.2.0")
// Test Containers
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:kafka")
testImplementation("org.testcontainers:rabbitmq")
}
dependencyManagement {
imports {
mavenBom("io.micrometer:micrometer-tracing-bom:1.1.2")
mavenBom("org.testcontainers:testcontainers-bom:1.18.3")
}
}
tasks {
compileJava {
options.compilerArgs.add("--enable-preview")
}
test {
jvmArgs = listOf("--enable-preview")
useJUnitPlatform()
}
processResources {
filesMatching("application.yaml") {
expand(project.properties)
}
}
}