Skip to content

Commit

Permalink
chore: set dependency using version catalog (libs.versions.toml)
Browse files Browse the repository at this point in the history
  • Loading branch information
KimDoubleB committed Sep 18, 2024
1 parent ffc6378 commit 7652b34
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 48 deletions.
12 changes: 5 additions & 7 deletions buildSrc/src/main/kotlin/piikii-convention.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ group = "com.piikii"
version = "0.0.1-SNAPSHOT"

dependencies {
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.springframework.boot:spring-boot-autoconfigure")
implementation("io.github.microutils:kotlin-logging-jvm:3.0.5")

testImplementation("org.springframework.boot:spring-boot-starter-test")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
annotationProcessor(libs.spring.boot.annotation.processor)
annotationProcessor(libs.bundles.spring.common)
annotationProcessor(libs.bundles.kotlin.spring)
testImplementation(libs.bundles.test.implementation)
testRuntimeOnly(libs.bundles.test.runtime)
}

// piikii common 의존성 전체 추가
Expand Down
11 changes: 10 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,16 @@ kotlin-junit5 = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit5" }
junit = { group = "org.junit.platform", name = "junit-platform-launcher" }

[bundles]
spring-common = ["spring-boot-starter-autoconfigure"]
kotlin-spring = ["kotlin-refelct", "kotlin-jackson", "kotlin-logging"]
spring-autoconfigure = ["spring-boot-starter-autoconfigure"]
test-implementation = ["spring-boot-starter-test", "kotlin-junit5"]
test-runtime = ["junit"]

bootstarp = ["spring-boot-starter-web", "spring-boot-starter-actuator", "opentelemetry-starter"]
bootstarp-runtime = ["micrometer-prometheus"]
domain-application = ["spring-boot-docs", "spring-transaction"]
adaptor-input-http = ["spring-boot-starter-web", "spring-boot-starter-aop", "spring-boot-docs", "spring-boot-starter-validation"]
adaptor-persistence-postgresql = ["spring-boot-starter-jpa", "postgresql"]
adaptor-storage = ["spring-web", "aws-sdk-s3", "jaxb-api", "jaxb-runtime"]
adaptor-cache-redis = ["spring-boot-starter-cache", "spring-boot-starter-redis"]
adaptor-cache-caffeine = ["spring-boot-starter-cache", "caffeine"]
8 changes: 1 addition & 7 deletions piikii-application/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,5 @@ plugins {
}

dependencies {
// for docs
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0")

// for transaction
implementation("org.springframework:spring-tx:6.1.10")
implementation(libs.bundles.domain.application)
}


12 changes: 6 additions & 6 deletions piikii-bootstrap/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ dependencies {
implementation(project(":piikii-output-web:avocado"))
implementation(project(":piikii-output-web:lemon"))
implementation(project(":piikii-output-web:tmap"))
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter")
runtimeOnly("io.micrometer:micrometer-registry-prometheus")

implementation(libs.bundles.bootstarp)
runtimeOnly(libs.bundles.bootstarp.runtime)

testImplementation(project(":piikii-application"))

// 현재 미사용으로 의존성 추가 제외
// implementation(project(":piikii-output-eventbroker:kafka"))
// 현재 미사용으로 의존성 추가 제외
// implementation(project(":piikii-output-eventbroker:kafka"))
}

tasks {
Expand Down
4 changes: 1 addition & 3 deletions piikii-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ plugins {
dependencies {
// for RestClient
dependencies {
implementation("org.springframework:spring-web") {
implementation(libs.spring.web) {
exclude("org.springframework:spring-beans")
exclude("org.springframework:spring-core")
exclude("org.springframework:spring-aop")
exclude("org.springframework:spring-context")
}
}
}


9 changes: 1 addition & 8 deletions piikii-input-http/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,5 @@ plugins {

dependencies {
implementation(project(":piikii-application"))
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-aop")

// for docs
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0")

// for validation
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation(libs.bundles.adaptor.input.http)
}
3 changes: 1 addition & 2 deletions piikii-output-cache/caffeine/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ plugins {
}

dependencies {
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("com.github.ben-manes.caffeine:caffeine")
implementation(libs.bundles.adaptor.cache.caffeine)
}
3 changes: 1 addition & 2 deletions piikii-output-cache/redis/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ plugins {

dependencies {
implementation(project(":piikii-application"))
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation(libs.bundles.adaptor.cache.redis)
}
2 changes: 1 addition & 1 deletion piikii-output-eventbroker/kafka/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ plugins {

dependencies {
implementation(project(":piikii-application"))
implementation("org.springframework.kafka:spring-kafka")
implementation(libs.spring.kafka)
}
3 changes: 1 addition & 2 deletions piikii-output-persistence/postgresql/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ plugins {

dependencies {
implementation(project(":piikii-application"))
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.postgresql:postgresql")
implementation(libs.bundles.adaptor.persistence.postgresql)
}

allOpen {
Expand Down
7 changes: 1 addition & 6 deletions piikii-output-storage/ncp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,5 @@ plugins {

dependencies {
implementation(project(":piikii-application"))
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")

implementation("org.springframework:spring-web")
implementation("com.amazonaws:aws-java-sdk-s3:1.11.238")
implementation("javax.xml.bind:jaxb-api:2.3.1")
implementation("org.glassfish.jaxb:jaxb-runtime:2.3.1")
implementation(libs.bundles.adaptor.storage)
}
2 changes: 1 addition & 1 deletion piikii-output-web/avocado/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ plugins {

dependencies {
implementation(project(":piikii-application"))
implementation("org.springframework:spring-web")
implementation(libs.spring.web)
}
2 changes: 1 addition & 1 deletion piikii-output-web/lemon/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ plugins {

dependencies {
implementation(project(":piikii-application"))
implementation("org.springframework:spring-web")
implementation(libs.spring.web)
}
2 changes: 1 addition & 1 deletion piikii-output-web/tmap/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ plugins {

dependencies {
implementation(project(":piikii-application"))
implementation("org.springframework:spring-web")
implementation(libs.spring.web)
}

0 comments on commit 7652b34

Please sign in to comment.