-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
88 lines (70 loc) · 2.17 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
88 lines (70 loc) · 2.17 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
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
kotlin("jvm")
kotlin("plugin.spring")
kotlin("plugin.jpa")
id("org.springframework.boot")
id("io.spring.dependency-management")
id("jacoco-report-aggregation")
id("org.sonarqube")
}
apply(from = "gradle/jacoco.gradle.kts")
allprojects {
group = "site"
version = "0.0.1-SNAPSHOT"
description = "TechMoa Application"
repositories {
mavenCentral()
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
testLogging {
showStandardStreams = true
events("passed", "skipped", "failed")
debug {
events("standardOut", "standardError")
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
}
}
}
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
dependencies {
implementation("org.jetbrains.kotlin:kotlin-reflect")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testImplementation("io.kotest:kotest-runner-junit5:${property("kotestVersion")}")
testImplementation("io.kotest:kotest-assertions-core:${property("kotestVersion")}")
testImplementation("io.mockk:mockk:${property("mockkVersion")}")
}
}
// Spring 모듈 (domain 제외): Spring Boot + Actuator + Prometheus
configure(subprojects.filter { it.name != "domain" }) {
apply(plugin = "org.jetbrains.kotlin.plugin.spring")
apply(plugin = "org.springframework.boot")
apply(plugin = "io.spring.dependency-management")
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.springframework.boot:spring-boot-starter-actuator")
runtimeOnly("io.micrometer:micrometer-registry-prometheus")
testImplementation("org.springframework.boot:spring-boot-starter-test")
}
// boot 모듈만 bootJar 활성화
if (project.name != "boot") {
tasks.named<BootJar>("bootJar") {
enabled = false
}
tasks.named<Jar>("jar") {
enabled = true
}
}
}
// Root project는 빌드 결과물 비활성화
tasks.named<BootJar>("bootJar") {
enabled = false
}
tasks.named<Jar>("jar") {
enabled = false
}