-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
105 lines (88 loc) · 2.85 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id(Plugins.Id.SPRING_BOOT) version Versions.SPRING_BOOT apply false
id(Plugins.Id.SPRING_DEPENDENCY_MANAGEMENT) version Versions.SPRING_DEPENDENCY_MANAGEMENT
id(Plugins.Id.KSP) version Versions.KSP
id(Plugins.Id.KTLINT) version Versions.KTLINT
id(Plugins.Id.KTLINT_IDEA) version Versions.KTLINT
id(Plugins.Id.ASCII_DOCTOR) version Versions.ASCII_DOCTOR
kotlin(Plugins.Modules.JVM) version Versions.KOTLIN
kotlin(Plugins.Modules.SPRING) version Versions.KOTLIN
kotlin(Plugins.Modules.JPA) version Versions.KOTLIN apply false
kotlin(Plugins.Modules.KAPT) version Versions.KOTLIN
}
buildscript {
dependencies {
classpath(kotlin(Plugins.Modules.GRADLE_PLUGIN, Versions.KOTLIN))
}
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
allprojects {
apply {
plugin<JavaLibraryPlugin>()
plugin(Plugins.Id.KOTLIN_JVM)
}
repositories {
mavenCentral()
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
tasks.withType<Test> {
maxHeapSize = "2048M"
jvmArgs("-Dspring.test.context.cache.maxSize=1")
useJUnitPlatform()
}
}
subprojects {
dependencies {
implementation(Dependencies.Kotlin.REFLECT)
implementation(Dependencies.Kotlin.STDLIB_JDK8)
implementation(Dependencies.Google.GSON)
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = Versions.JAVA
}
}
}
val springProjects = listOf(
projects.common,
projects.commonSpring,
projects.api,
projects.application.mission,
projects.application.quote,
projects.application.recommend,
projects.application.user,
projects.persistence.rdb,
projects.infra.kakao
).map { it.dependencyProject }
configure(springProjects) {
apply {
plugin(Plugins.Id.SPRING_BOOT)
plugin(Plugins.Id.SPRING_DEPENDENCY_MANAGEMENT)
}
dependencyManagement {
imports {
mavenBom(Dependencies.Management.SPRING_CLOUD)
}
}
dependencies {
implementation(Dependencies.Spring.Boot.WEB)
implementation(Dependencies.Spring.Boot.VALIDATION)
implementation(Dependencies.Spring.Boot.CONFIGURATION_PROCESSOR)
annotationProcessor(Dependencies.Spring.Boot.CONFIGURATION_PROCESSOR)
testRuntimeOnly(Dependencies.Database.H2)
testImplementation(Dependencies.Test.TEST)
testImplementation(Dependencies.Test.KOTEST_JUNIT5)
testImplementation(Dependencies.Test.KOTEST_CORE)
testImplementation(Dependencies.Test.KOTEST_SPRING)
testImplementation(Dependencies.Test.MOCKK)
}
}