Skip to content

Commit 0bc110b

Browse files
committed
chore: 프로젝트 모듈구조 클린아키텍쳐화
1 parent 858bf83 commit 0bc110b

File tree

6 files changed

+79
-36
lines changed

6 files changed

+79
-36
lines changed

build.gradle.kts

+78-22
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
import org.springframework.boot.gradle.tasks.bundling.BootJar
23

34
plugins {
45
id("org.springframework.boot") version "3.0.2"
@@ -7,35 +8,90 @@ plugins {
78
kotlin("plugin.spring") version "1.7.22"
89
}
910

10-
group = "co.bearus"
11-
version = "0.0.1-SNAPSHOT"
12-
java.sourceCompatibility = JavaVersion.VERSION_17
13-
1411
repositories {
1512
mavenCentral()
1613
}
1714

18-
dependencies {
19-
implementation("org.springframework.boot:spring-boot-starter-data-r2dbc")
20-
implementation("org.springframework.boot:spring-boot-starter-webflux")
21-
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
22-
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
23-
implementation("org.flywaydb:flyway-core")
24-
implementation("org.jetbrains.kotlin:kotlin-reflect")
25-
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
26-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
27-
implementation("org.springframework:spring-jdbc")
28-
testImplementation("org.springframework.boot:spring-boot-starter-test")
29-
testImplementation("io.projectreactor:reactor-test")
15+
subprojects {
16+
apply(plugin = "java-library")
17+
apply(plugin = "org.springframework.boot")
18+
apply(plugin = "io.spring.dependency-management")
19+
20+
group = "co.bearus"
21+
version = "0.0.1-SNAPSHOT"
22+
java.sourceCompatibility = JavaVersion.VERSION_17
23+
24+
repositories {
25+
mavenCentral()
26+
}
27+
28+
dependencies {
29+
implementation("org.springframework.boot:spring-boot-starter-data-r2dbc")
30+
implementation("org.springframework.boot:spring-boot-starter-webflux")
31+
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
32+
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
33+
implementation("org.flywaydb:flyway-core")
34+
implementation("org.jetbrains.kotlin:kotlin-reflect")
35+
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
36+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
37+
implementation("org.springframework:spring-jdbc")
38+
testImplementation("org.springframework.boot:spring-boot-starter-test")
39+
testImplementation("io.projectreactor:reactor-test")
40+
}
41+
42+
tasks.withType<KotlinCompile> {
43+
kotlinOptions {
44+
freeCompilerArgs = listOf("-Xjsr305=strict")
45+
jvmTarget = "17"
46+
}
47+
}
48+
49+
tasks.withType<Test> {
50+
useJUnitPlatform()
51+
}
52+
53+
val jar: Jar by tasks
54+
val bootJar: BootJar by tasks
55+
56+
bootJar.enabled = false
57+
jar.enabled = false
58+
}
59+
60+
project(":use-case") {
61+
dependencies {
62+
api(project(":entity"))
63+
}
3064
}
3165

32-
tasks.withType<KotlinCompile> {
33-
kotlinOptions {
34-
freeCompilerArgs = listOf("-Xjsr305=strict")
35-
jvmTarget = "17"
66+
project(":infrastructure") {
67+
dependencies {
68+
api(project(":use-case"))
69+
//DB
3670
}
3771
}
3872

39-
tasks.withType<Test> {
40-
useJUnitPlatform()
73+
project(":presenter") {
74+
dependencies {
75+
api(project(":use-case"))
76+
api("org.springframework.boot:spring-boot-starter-webflux")
77+
api("org.springframework.boot:spring-boot-starter-validation")
78+
}
79+
}
80+
81+
project(":config") {
82+
val jar: Jar by tasks
83+
val bootJar: BootJar by tasks
84+
85+
bootJar.enabled = true
86+
jar.enabled = true
87+
88+
dependencies {
89+
api(project(":entity"))
90+
api(project(":use-case"))
91+
api(project(":presenter"))
92+
api(project(":infrastructure"))
93+
94+
api("org.springframework.boot:spring-boot-starter-webflux")
95+
testImplementation("org.springframework.boot:spring-boot-starter-test")
96+
}
4197
}

config/src/main/resources/application.yaml

Whitespace-only changes.

settings.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
rootProject.name = "dogsound-counter-api"
2+
include("entity", "use-case", "infrastructure", "presenter", "config")

src/main/resources/application.properties

-1
This file was deleted.

src/test/kotlin/co/bearus/dogsoundcounterapi/DogsoundCounterApiApplicationTests.kt

-13
This file was deleted.

0 commit comments

Comments
 (0)