-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
93 lines (77 loc) · 2.9 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
93 lines (77 loc) · 2.9 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
plugins {
kotlin("jvm") version "2.1.0"
kotlin("kapt") version "2.1.0"
kotlin("plugin.spring") version "2.1.0"
kotlin("plugin.jpa") version "2.1.0"
id("org.springframework.boot") version "3.4.1"
id("io.spring.dependency-management") version "1.1.7"
}
fun getGitHash(): String {
return providers.exec {
commandLine("git", "rev-parse", "--short", "HEAD")
}.standardOutput.asText.get().trim()
}
group = "kr.hhplus.be"
version = getGitHash()
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
kotlin {
compilerOptions {
freeCompilerArgs.addAll("-Xjsr305=strict")
jvmToolchain(17)
}
}
repositories {
mavenCentral()
}
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:2024.0.0")
}
}
dependencies {
// Kotlin
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
// Spring
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.retry:spring-retry")
implementation("org.springframework.boot:spring-boot-starter-aop")
implementation("org.springframework.boot:spring-boot-starter-validation")
// Swagger
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.6")
// DB
runtimeOnly("com.mysql:mysql-connector-j")
// Redis
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.redisson:redisson-spring-boot-starter:3.24.3")
// Cache
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
// Kafka
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.kafka:spring-kafka")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1")
// Actuator + Monitoring
implementation("io.micrometer:micrometer-registry-prometheus")
// Test
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-testcontainers")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:mysql")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("io.mockk:mockk:1.14.0")
testImplementation("com.ninja-squad:springmockk:4.0.2")
testImplementation("com.redis:testcontainers-redis:2.2.2")
testImplementation("org.testcontainers:kafka:1.21.0")
testImplementation("org.springframework.kafka:spring-kafka-test")
}
tasks.withType<Test> {
useJUnitPlatform()
systemProperty("user.timezone", "UTC")
}