-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
112 lines (92 loc) · 2.93 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
id("org.springframework.boot") version "3.3.4"
id("io.spring.dependency-management") version "1.1.6"
kotlin("jvm") version "1.9.22"
kotlin("plugin.spring") version "1.9.22"
}
group = "me.letsdev"
version = "0.0.1-SNAPSHOT"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
configureEach {
// exclude LOGBACK
exclude(group = "org.springframework.boot", module = "spring-boot-starter-logging")
}
}
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-log4j2")
developmentOnly("org.springframework.boot:spring-boot-devtools")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
// database
runtimeOnly("com.h2database:h2")
// mapstruct
implementation("org.mapstruct:mapstruct:1.6.0")
annotationProcessor("org.mapstruct:mapstruct-processor:1.6.0")
annotationProcessor("org.projectlombok:lombok-mapstruct-binding:0.2.0")
// flyway
implementation("org.flywaydb:flyway-core:9.22.3")
// lombok
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
// error code
implementation("com.github.merge-simpson:letsdev-error-code-api:0.1.0")
// password encoder
implementation("org.springframework.security:spring-security-crypto")
implementation("org.bouncycastle:bcprov-jdk18on:1.78.1")
// instance cache
implementation("com.github.ben-manes.caffeine:caffeine:3.1.8")
// test
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation(kotlin("test"))
testImplementation("io.kotest:kotest-runner-junit5:5.9.1")
testImplementation("org.jetbrains.kotlin:kotlin-reflect")
testImplementation("io.mockk:mockk:1.13.12")
}
sourceSets {
test {
java {
setSrcDirs(listOf("src/test/kotlin"))
}
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.withType<JavaCompile> {
options.compilerArgs.addAll(
listOf(
"--enable-preview",
"-Amapstruct.defaultComponentModel=spring"
)
)
}
tasks.withType<Test> {
useJUnitPlatform()
jvmArgs("--enable-preview")
}
tasks.named<JavaExec>("bootRun") {
jvmArgs("--enable-preview")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "21"
}
}