From 7a76a2a43b6f607c85da7421657e820607c9987f Mon Sep 17 00:00:00 2001 From: Jason Yoo Date: Tue, 26 Nov 2024 22:50:35 +0900 Subject: [PATCH] =?UTF-8?q?[PoC]=20Gradle=20Version=20Catalog=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=ED=95=B4=EB=B3=B4=EA=B8=B0=20(#429)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: try gradle version catalog * chore: use type-safe plugin id --- app-server/build.gradle.kts | 49 ++++++----- app-server/gradle.properties | 27 ------ app-server/gradle/libs.versions.toml | 82 +++++++++++++++++++ app-server/settings.gradle.kts | 24 ------ .../admin_api/build.gradle.kts | 12 ++- .../api_specification/api/build.gradle.kts | 12 ++- .../application/build.gradle.kts | 2 +- .../accessibility/domain/build.gradle.kts | 8 +- .../accessibility/infra/build.gradle.kts | 15 ++-- .../challenge/domain/build.gradle.kts | 2 +- .../challenge/infra/build.gradle.kts | 9 +- .../infra/build.gradle.kts | 13 ++- .../misc/infra/build.gradle.kts | 10 +-- .../notification/infra/build.gradle.kts | 9 +- .../place/application/build.gradle.kts | 7 +- .../place/domain/build.gradle.kts | 3 +- .../place/infra/build.gradle.kts | 20 ++--- .../place_search/infra/build.gradle.kts | 11 ++- .../quest/application/build.gradle.kts | 5 +- .../quest/domain/build.gradle.kts | 5 +- .../quest/infra/build.gradle.kts | 9 +- .../user/infra/build.gradle.kts | 15 ++-- .../domain/server_event/build.gradle.kts | 13 +-- .../infra/network/build.gradle.kts | 4 +- .../infra/persistence_model/build.gradle.kts | 12 +-- .../infra/spring_message/build.gradle.kts | 8 +- .../infra/spring_web/build.gradle.kts | 12 ++- .../stdlib/build.gradle.kts | 32 +++----- .../test/spring_it/build.gradle.kts | 9 +- .../local_script/build.gradle.kts | 15 ++-- .../scc_server/build.gradle.kts | 20 ++--- 31 files changed, 218 insertions(+), 256 deletions(-) create mode 100644 app-server/gradle/libs.versions.toml diff --git a/app-server/build.gradle.kts b/app-server/build.gradle.kts index b88fad79f..d9c0278da 100644 --- a/app-server/build.gradle.kts +++ b/app-server/build.gradle.kts @@ -3,12 +3,12 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.springframework.boot.gradle.tasks.bundling.BootJar plugins { - kotlin("jvm") - kotlin("plugin.spring") - kotlin("plugin.jpa") - id("org.springframework.boot") - id("io.gitlab.arturbosch.detekt") - id("io.spring.dependency-management") + alias(libs.plugins.kotlin.jvm) + alias(libs.plugins.kotlin.spring) + alias(libs.plugins.kotlin.jpa) + alias(libs.plugins.spring.boot) + alias(libs.plugins.detekt) + alias(libs.plugins.spring.dependency.management) } repositories { @@ -28,9 +28,12 @@ val detektExcludedProjects = listOf( project(":deploying_apps:local_script"), ) subprojects { - apply(plugin = "kotlin") - apply(plugin = "kotlin-spring") - apply(plugin = "kotlin-jpa") + apply { + plugin(rootProject.libs.plugins.kotlin.jvm.get().pluginId) + plugin(rootProject.libs.plugins.kotlin.spring.get().pluginId) + plugin(rootProject.libs.plugins.kotlin.jpa.get().pluginId) + plugin(rootProject.libs.plugins.spring.dependency.management.get().pluginId) + } noArg { annotation("club.staircrusher.stdlib.persistence.jpa.NoArgsConstructor") @@ -43,6 +46,12 @@ subprojects { annotation("club.staircrusher.stdlib.di.annotation.Component") } + dependencyManagement { + imports { + mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) + } + } + java { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 @@ -61,12 +70,7 @@ subprojects { } else if (project.name == "application") { implementation("org.springframework.boot:spring-boot-starter-data-jpa") } - val kotlinLoggingVersion: String by project - val kotlinSerialization: String by project - val kotlinVersion: String by project - implementation("io.github.microutils:kotlin-logging-jvm:$kotlinLoggingVersion") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerialization") - implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") + implementation(rootProject.libs.bundles.kotlin.subproject) } tasks.test { @@ -87,7 +91,9 @@ subprojects { } if (this !in detektExcludedProjects) { - apply(plugin = "io.gitlab.arturbosch.detekt") + apply { + plugin(rootProject.libs.plugins.detekt.get().pluginId) + } detekt { config = files("$rootDir/detekt-config.yml") @@ -106,14 +112,6 @@ subprojects { } } } - - - apply(plugin = "io.spring.dependency-management") - dependencyManagement { - imports { - mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) - } - } } /** @@ -153,12 +151,11 @@ subprojects { } } - val coroutineVersion: String by project listOfNotNull(domainProject, applicationProject, infraProject) .forEach { it.dependencies { implementation(rootProject.projects.crossCuttingConcern.stdlib) - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion") + implementation(rootProject.libs.coroutines.core) } } } diff --git a/app-server/gradle.properties b/app-server/gradle.properties index 4a144b8cd..b45464eba 100644 --- a/app-server/gradle.properties +++ b/app-server/gradle.properties @@ -1,31 +1,4 @@ kotlin.code.style=official -kotlinVersion=1.8.20 -kotlinxSerializationVersion=1.5.0 -kotlinLoggingVersion=3.0.5 -kotlinSerialization=1.5.1 -jakartaInjectVersion=2.0.1 -springBootVersion=3.0.5 -springDependencyManagementVersion=1.1.0 -springContextVersion=6.0.7 -coroutineVersion=1.6.4 -jUnitJupiterVersion=5.9.1 -wireVersion=4.4.1 -geoToolsVersion=26.5 -jtsVersion=1.19.0 -proj4jVersion=1.3.0 -postgresqlVersion=42.5.0 -flywayVersion=9.4.0 -kspVersion=1.8.20-1.0.10 -kopyKatVersion=1.0.4 -detektVersion=1.21.0 -jibVersion=3.4.1 -jacksonModuleKotlinVersion=2.12.3 -awsSdkVersion=2.17.292 -guavaVersion=31.1-jre -sentryVersion=6.7.0 -logbackJsonVersion=0.1.5 -firebaseAdminVersion=9.3.0 -apacheCommonsVersion=1.11.0 # gradle config org.gradle.jvmargs=-Xmx8g diff --git a/app-server/gradle/libs.versions.toml b/app-server/gradle/libs.versions.toml new file mode 100644 index 000000000..846c2ce07 --- /dev/null +++ b/app-server/gradle/libs.versions.toml @@ -0,0 +1,82 @@ +[versions] +# plugins +kotlin = "1.8.20" +springBoot = "3.0.5" +springDependencyManagement = "1.1.0" +detekt = "1.21.0" +ksp = "1.8.20-1.0.10" +jib = "3.4.1" +openapiGenerator = "6.0.1" + +# libraries +kotlinLogging = "3.0.5" +kotlinSerialization = "1.5.1" +coroutine = "1.6.4" +geoTools = "26.5" +jts = "1.19.0" +proj4j = "1.3.0" +kopykat = "1.0.4" +apacheCommons = "1.11.0" +jUnitJupiter = "5.9.1" +jacksonModuleKotlin = "2.12.3" +awsSdk = "2.17.292" +guava = "31.1-jre" +firebaseAdmin = "9.3.0" +sentry = "6.7.0" +logback = "0.1.5" +postgresql = "42.5.0" +flyway = "9.4.0" +jwt = "3.18.1" +mockitoKotlin = "5.1.0" + +[libraries] +kotlin-logging = { group = "io.github.microutils", name = "kotlin-logging-jvm", version.ref = "kotlinLogging" } +kotlin-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinSerialization" } +kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" } +kotlin-stdlib-jdk8 = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlin" } +coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutine" } +coroutines-reactive = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-reactive", version.ref = "coroutine" } +coroutines-jdk8 = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-jdk8", version.ref = "coroutine" } +coroutines-guava = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-guava", version.ref = "coroutine" } +coroutines-reactor = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-reactor", version.ref = "coroutine" } +geotools-referencing = { group = "org.geotools", name = "gt-referencing", version.ref = "geoTools" } +jts-core = { group = "org.locationtech.jts", name = "jts-core", version.ref = "jts" } +proj4j-core = { group = "org.locationtech.proj4j", name = "proj4j", version.ref = "proj4j" } +proj4j-epsg = { group = "org.locationtech.proj4j", name = "proj4j-epsg", version.ref = "proj4j" } +kopykat-ksp = { group = "at.kopyk", name = "kopykat-ksp", version.ref = "kopykat" } +kopykat-annotations = { group = "at.kopyk", name = "kopykat-annotations", version.ref = "kopykat" } +apache-commons-text = { group = "org.apache.commons", name = "commons-text", version.ref = "apacheCommons" } +apache-commons-csv = { group = "org.apache.commons", name = "commons-csv", version.ref = "apacheCommons" } +junit-jupiter-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "jUnitJupiter" } +junit-jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "jUnitJupiter" } +jackson-module-kotlin = { group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin", version.ref = "jacksonModuleKotlin" } +aws-sdk-s3 = { group = "software.amazon.awssdk", name = "s3", version.ref = "awsSdk" } +aws-sdk-rekognition = { group = "software.amazon.awssdk", name = "rekognition", version.ref = "awsSdk" } +aws-sdk-sts = { group = "software.amazon.awssdk", name = "sts", version.ref = "awsSdk" } +guava = { group = "com.google.guava", name = "guava", version.ref = "guava" } +firebase-admin = { group = "com.google.firebase", name = "firebase-admin", version.ref = "firebaseAdmin" } +sentry-spring-boot-starter = { group = "io.sentry", name = "sentry-spring-boot-starter-jakarta", version.ref = "sentry" } +sentry-logback = { group = "io.sentry", name = "sentry-logback", version.ref = "sentry" } +logback-jackson = { group = "ch.qos.logback.contrib", name = "logback-jackson", version.ref = "logback" } +logback-json-classic = { group = "ch.qos.logback.contrib", name = "logback-jackson", version.ref = "logback" } +flyway-core = { group = "org.flywaydb", name = "flyway-core", version.ref = "flyway" } +postgresql = { group = "org.postgresql", name = "postgresql", version.ref = "postgresql" } +java-jwt = { group = "com.auth0", name = "java-jwt", version.ref = "jwt" } +mockito-kotlin = { group = "org.mockito.kotlin", name = "mockito-kotlin", version.ref = "mockitoKotlin" } + +[bundles] +kotlin-subproject = ["kotlin-logging", "kotlin-serialization-json", "kotlin-reflect"] +sentry = ["sentry-spring-boot-starter", "sentry-logback"] +logback = ["logback-jackson", "logback-json-classic"] + +[plugins] +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +kotlin-spring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin" } +kotlin-jpa = { id = "org.jetbrains.kotlin.plugin.jpa", version.ref = "kotlin" } +spring-boot = { id = "org.springframework.boot", version.ref = "springBoot" } +spring-dependency-management = { id = "io.spring.dependency-management", version.ref = "springDependencyManagement" } +detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } +jib = { id = "com.google.cloud.tools.jib", version.ref = "jib" } +openapi-generator = { id = "org.openapi.generator", version.ref = "openapiGenerator" } diff --git a/app-server/settings.gradle.kts b/app-server/settings.gradle.kts index 7eb883450..b8bbbd75f 100644 --- a/app-server/settings.gradle.kts +++ b/app-server/settings.gradle.kts @@ -19,30 +19,6 @@ fileTree("subprojects").filter { it.name == "build.gradle.kts" }.forEach { pluginManagement { - val kotlinVersion: String by settings - val springBootVersion: String by settings - val springDependencyManagementVersion: String by settings - val wireVersion: String by settings - val kspVersion: String by settings - val detektVersion: String by settings - val jibVersion: String by settings - - plugins { - kotlin("jvm") version kotlinVersion - kotlin("plugin.serialization") version kotlinVersion - kotlin("plugin.spring") version kotlinVersion apply false - kotlin("plugin.jpa") version kotlinVersion apply false - - id("org.jetbrains.kotlin.plugin.spring") version kotlinVersion - id("org.springframework.boot") version springBootVersion - id("com.squareup.wire") version wireVersion - id("com.google.devtools.ksp") version kspVersion - id("io.gitlab.arturbosch.detekt") version detektVersion - id("com.google.cloud.tools.jib") version jibVersion - - id("io.spring.dependency-management") version springDependencyManagementVersion - } - repositories { mavenCentral() gradlePluginPortal() diff --git a/app-server/subprojects/api_specification/admin_api/build.gradle.kts b/app-server/subprojects/api_specification/admin_api/build.gradle.kts index ab15dd55c..b3257a44b 100644 --- a/app-server/subprojects/api_specification/admin_api/build.gradle.kts +++ b/app-server/subprojects/api_specification/admin_api/build.gradle.kts @@ -1,8 +1,6 @@ -val kotlinVersion: String by project - plugins { - kotlin("jvm") - id("org.openapi.generator") version "6.0.1" + alias(libs.plugins.kotlin.jvm) + alias(libs.plugins.openapi.generator) } dependencies { @@ -44,9 +42,9 @@ tasks.getByName("compileKotlin").dependsOn(openApiGenerateTask) // openApiGenerateTask로 생성된 build.gradle.kts의 dependencies를 여기에 복사한다. dependencies { - implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion") - implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.12.3") + implementation(libs.kotlin.stdlib.jdk8) + implementation(libs.kotlin.reflect) + implementation(libs.jackson.module.kotlin) implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.3") implementation("com.squareup.okhttp3:okhttp:4.9.1") } diff --git a/app-server/subprojects/api_specification/api/build.gradle.kts b/app-server/subprojects/api_specification/api/build.gradle.kts index 229b7adfe..ea5b92655 100644 --- a/app-server/subprojects/api_specification/api/build.gradle.kts +++ b/app-server/subprojects/api_specification/api/build.gradle.kts @@ -1,8 +1,6 @@ -val kotlinVersion: String by project - plugins { - kotlin("jvm") - id("org.openapi.generator") version "6.0.1" + alias(libs.plugins.kotlin.jvm) + alias(libs.plugins.openapi.generator) } dependencies { @@ -44,9 +42,9 @@ tasks.getByName("compileKotlin").dependsOn(openApiGenerateTask) // openApiGenerateTask로 생성된 build.gradle.kts의 dependencies를 여기에 복사한다. dependencies { - implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion") - implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.12.3") + implementation(libs.kotlin.stdlib.jdk8) + implementation(libs.kotlin.reflect) + implementation(libs.jackson.module.kotlin) implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.3") implementation("com.squareup.okhttp3:okhttp:4.9.1") } diff --git a/app-server/subprojects/bounded_context/accessibility/application/build.gradle.kts b/app-server/subprojects/bounded_context/accessibility/application/build.gradle.kts index 7c5bf3eca..6afe6764c 100644 --- a/app-server/subprojects/bounded_context/accessibility/application/build.gradle.kts +++ b/app-server/subprojects/bounded_context/accessibility/application/build.gradle.kts @@ -10,7 +10,7 @@ dependencies { implementation("org.sejda.webp-imageio:webp-imageio-sejda:0.1.0") implementation("org.bytedeco:javacv-platform:1.5.9") - testImplementation("org.mockito.kotlin:mockito-kotlin:5.1.0") + testImplementation(libs.mockito.kotlin) integrationTestImplementation(projects.crossCuttingConcern.test.springIt) integrationTestImplementation("org.springframework.boot:spring-boot-starter-web") diff --git a/app-server/subprojects/bounded_context/accessibility/domain/build.gradle.kts b/app-server/subprojects/bounded_context/accessibility/domain/build.gradle.kts index 1788e68ad..0c012cf86 100644 --- a/app-server/subprojects/bounded_context/accessibility/domain/build.gradle.kts +++ b/app-server/subprojects/bounded_context/accessibility/domain/build.gradle.kts @@ -1,8 +1,6 @@ dependencies { - val jacksonModuleKotlinVersion: String by project - implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonModuleKotlinVersion") + implementation(libs.jackson.module.kotlin) - val jUnitJupiterVersion: String by project - testImplementation("org.junit.jupiter:junit-jupiter-api:$jUnitJupiterVersion") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jUnitJupiterVersion") + testImplementation(libs.junit.jupiter.api) + testRuntimeOnly(libs.junit.jupiter.engine) } diff --git a/app-server/subprojects/bounded_context/accessibility/infra/build.gradle.kts b/app-server/subprojects/bounded_context/accessibility/infra/build.gradle.kts index 68dd541f4..8dde08376 100644 --- a/app-server/subprojects/bounded_context/accessibility/infra/build.gradle.kts +++ b/app-server/subprojects/bounded_context/accessibility/infra/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - id("io.spring.dependency-management") - id("org.springframework.boot") + alias(libs.plugins.spring.dependency.management) + alias(libs.plugins.spring.boot) } dependencies { @@ -14,14 +14,13 @@ dependencies { implementation(projects.crossCuttingConcern.infra.persistenceModel) implementation("org.springframework.boot:spring-boot-starter-web") implementation("org.springframework:spring-webflux") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8") + implementation(libs.coroutines.jdk8) integrationTestImplementation(projects.crossCuttingConcern.test.springIt) - val awsSdkVersion: String by project - implementation("software.amazon.awssdk:s3:$awsSdkVersion") - implementation("software.amazon.awssdk:rekognition:$awsSdkVersion") - runtimeOnly("software.amazon.awssdk:sts:$awsSdkVersion") // IRSA를 사용하기 위해서 필요함 + implementation(libs.aws.sdk.s3) + implementation(libs.aws.sdk.rekognition) + runtimeOnly(libs.aws.sdk.sts) // IRSA를 사용하기 위해서 필요함 testImplementation(projects.apiSpecification.domainEvent) - testImplementation("org.mockito.kotlin:mockito-kotlin:5.1.0") + testImplementation(libs.mockito.kotlin) } diff --git a/app-server/subprojects/bounded_context/challenge/domain/build.gradle.kts b/app-server/subprojects/bounded_context/challenge/domain/build.gradle.kts index 995961889..0a21cf924 100644 --- a/app-server/subprojects/bounded_context/challenge/domain/build.gradle.kts +++ b/app-server/subprojects/bounded_context/challenge/domain/build.gradle.kts @@ -2,5 +2,5 @@ dependencies { implementation(projects.boundedContext.place.domain) implementation("org.hibernate.orm:hibernate-core") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin") + implementation(libs.jackson.module.kotlin) } diff --git a/app-server/subprojects/bounded_context/challenge/infra/build.gradle.kts b/app-server/subprojects/bounded_context/challenge/infra/build.gradle.kts index 2558fbe1b..089bfea66 100644 --- a/app-server/subprojects/bounded_context/challenge/infra/build.gradle.kts +++ b/app-server/subprojects/bounded_context/challenge/infra/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - id("io.spring.dependency-management") - id("org.springframework.boot") + alias(libs.plugins.spring.dependency.management) + alias(libs.plugins.spring.boot) } dependencies { @@ -11,9 +11,8 @@ dependencies { integrationTestImplementation(projects.crossCuttingConcern.test.springIt) - val awsSdkVersion: String by project - implementation("software.amazon.awssdk:s3:$awsSdkVersion") - runtimeOnly("software.amazon.awssdk:sts:$awsSdkVersion") // IRSA를 사용하기 위해서 필요함 + implementation(libs.aws.sdk.s3) + runtimeOnly(libs.aws.sdk.sts) // IRSA를 사용하기 위해서 필요함 testImplementation(projects.boundedContext.place.application) } diff --git a/app-server/subprojects/bounded_context/external_accessibility/infra/build.gradle.kts b/app-server/subprojects/bounded_context/external_accessibility/infra/build.gradle.kts index 23cdefe6c..d5241f319 100644 --- a/app-server/subprojects/bounded_context/external_accessibility/infra/build.gradle.kts +++ b/app-server/subprojects/bounded_context/external_accessibility/infra/build.gradle.kts @@ -1,21 +1,18 @@ plugins { - id("io.spring.dependency-management") - id("org.springframework.boot") + alias(libs.plugins.spring.dependency.management) + alias(libs.plugins.spring.boot) } dependencies { - val awsSdkVersion: String by project - val apacheCommonsVersion: String by project - api(projects.apiSpecification.api) api(projects.apiSpecification.domainEvent) implementation(projects.crossCuttingConcern.infra.persistenceModel) implementation("org.springframework.boot:spring-boot-starter-web") implementation("io.projectreactor.netty:reactor-netty") implementation("org.springframework:spring-webflux") - implementation("org.apache.commons:commons-csv:$apacheCommonsVersion") - implementation("software.amazon.awssdk:s3:$awsSdkVersion") - runtimeOnly("software.amazon.awssdk:sts:$awsSdkVersion") // IRSA를 사용하기 위해서 필요함 + implementation(libs.apache.commons.csv) + implementation(libs.aws.sdk.s3) + runtimeOnly(libs.aws.sdk.sts) // IRSA를 사용하기 위해서 필요함 integrationTestImplementation(projects.crossCuttingConcern.test.springIt) testImplementation(projects.boundedContext.externalAccessibility.application) diff --git a/app-server/subprojects/bounded_context/misc/infra/build.gradle.kts b/app-server/subprojects/bounded_context/misc/infra/build.gradle.kts index f49ab05b3..c3c2ab3ff 100644 --- a/app-server/subprojects/bounded_context/misc/infra/build.gradle.kts +++ b/app-server/subprojects/bounded_context/misc/infra/build.gradle.kts @@ -1,11 +1,9 @@ dependencies { - val awsSdkVersion: String by project - implementation("software.amazon.awssdk:s3:$awsSdkVersion") - implementation("software.amazon.awssdk:rekognition:$awsSdkVersion") - runtimeOnly("software.amazon.awssdk:sts:$awsSdkVersion") // IRSA를 사용하기 위해서 필요함 - + implementation(libs.aws.sdk.s3) + implementation(libs.aws.sdk.rekognition) + runtimeOnly(libs.aws.sdk.sts) // IRSA를 사용하기 위해서 필요함 implementation("org.springframework:spring-webflux") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8") + implementation(libs.coroutines.jdk8) integrationTestImplementation(projects.crossCuttingConcern.test.springIt) } diff --git a/app-server/subprojects/bounded_context/notification/infra/build.gradle.kts b/app-server/subprojects/bounded_context/notification/infra/build.gradle.kts index f44d68dc7..bccfc1de7 100644 --- a/app-server/subprojects/bounded_context/notification/infra/build.gradle.kts +++ b/app-server/subprojects/bounded_context/notification/infra/build.gradle.kts @@ -1,8 +1,5 @@ dependencies { - val kotlinLoggingVersion: String by project - implementation("io.github.microutils:kotlin-logging-jvm:$kotlinLoggingVersion") - - val firebaseAdminVersion: String by project - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-guava") - api("com.google.firebase:firebase-admin:$firebaseAdminVersion") + implementation(libs.kotlin.logging) + implementation(libs.coroutines.guava) + api(libs.firebase.admin) } diff --git a/app-server/subprojects/bounded_context/place/application/build.gradle.kts b/app-server/subprojects/bounded_context/place/application/build.gradle.kts index a3646afcd..e1a71c065 100644 --- a/app-server/subprojects/bounded_context/place/application/build.gradle.kts +++ b/app-server/subprojects/bounded_context/place/application/build.gradle.kts @@ -1,8 +1,5 @@ dependencies { - val kotlinLoggingVersion: String by project implementation(projects.apiSpecification.domainEvent) - implementation("io.github.microutils:kotlin-logging-jvm:$kotlinLoggingVersion") - - val jtsVersion: String by project - implementation("org.locationtech.jts:jts-core:$jtsVersion") + implementation(libs.kotlin.logging) + implementation(libs.jts.core) } diff --git a/app-server/subprojects/bounded_context/place/domain/build.gradle.kts b/app-server/subprojects/bounded_context/place/domain/build.gradle.kts index 16783b0ff..cd781ce43 100644 --- a/app-server/subprojects/bounded_context/place/domain/build.gradle.kts +++ b/app-server/subprojects/bounded_context/place/domain/build.gradle.kts @@ -1,5 +1,4 @@ dependencies { - val jtsVersion: String by project implementation("org.hibernate:hibernate-spatial:6.1.7.Final") - implementation("org.locationtech.jts:jts-core:$jtsVersion") + implementation(libs.jts.core) } diff --git a/app-server/subprojects/bounded_context/place/infra/build.gradle.kts b/app-server/subprojects/bounded_context/place/infra/build.gradle.kts index dd3bb5a3d..da9637361 100644 --- a/app-server/subprojects/bounded_context/place/infra/build.gradle.kts +++ b/app-server/subprojects/bounded_context/place/infra/build.gradle.kts @@ -1,12 +1,9 @@ plugins { - kotlin("plugin.serialization") - id("org.springframework.boot") + alias(libs.plugins.kotlin.serialization) + alias(libs.plugins.spring.boot) } dependencies { - val kotlinLoggingVersion: String by project - val kotlinxSerializationVersion: String by project - implementation(projects.crossCuttingConcern.stdlib) implementation(projects.crossCuttingConcern.infra.persistenceModel) implementation(projects.crossCuttingConcern.infra.network) @@ -16,15 +13,12 @@ dependencies { implementation("org.springframework:spring-webflux") implementation("io.projectreactor.netty:reactor-netty") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactive") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinxSerializationVersion") - - implementation("io.github.microutils:kotlin-logging-jvm:$kotlinLoggingVersion") - - val guavaVersion: String by project - implementation("com.google.guava:guava:$guavaVersion") + implementation(libs.coroutines.reactive) + implementation(libs.kotlin.serialization.json) + implementation(libs.kotlin.logging) + implementation(libs.guava) testImplementation(projects.apiSpecification.domainEvent) - testImplementation("org.mockito.kotlin:mockito-kotlin:5.1.0") + testImplementation(libs.mockito.kotlin) integrationTestImplementation(projects.crossCuttingConcern.test.springIt) } diff --git a/app-server/subprojects/bounded_context/place_search/infra/build.gradle.kts b/app-server/subprojects/bounded_context/place_search/infra/build.gradle.kts index 742b50049..df6f97fca 100644 --- a/app-server/subprojects/bounded_context/place_search/infra/build.gradle.kts +++ b/app-server/subprojects/bounded_context/place_search/infra/build.gradle.kts @@ -1,20 +1,19 @@ plugins { - id("org.springframework.boot") - id("io.spring.dependency-management") + alias(libs.plugins.spring.boot) + alias(libs.plugins.spring.dependency.management) } dependencies { implementation(projects.boundedContext.place.domain) implementation(projects.boundedContext.accessibility.domain) - runtimeOnly("org.jetbrains.kotlinx:kotlinx-coroutines-reactor") + runtimeOnly(libs.coroutines.reactor) api(projects.apiSpecification.api) implementation("org.springframework.boot:spring-boot-starter-web") integrationTestImplementation(projects.boundedContext.place.application) integrationTestImplementation(projects.boundedContext.accessibility.application) - integrationTestImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.12.3") + integrationTestImplementation(libs.jackson.module.kotlin) integrationTestImplementation(projects.crossCuttingConcern.test.springIt) - integrationTestImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0") - + integrationTestImplementation(libs.mockito.kotlin) } diff --git a/app-server/subprojects/bounded_context/quest/application/build.gradle.kts b/app-server/subprojects/bounded_context/quest/application/build.gradle.kts index 0895a2d25..b857c5042 100644 --- a/app-server/subprojects/bounded_context/quest/application/build.gradle.kts +++ b/app-server/subprojects/bounded_context/quest/application/build.gradle.kts @@ -3,10 +3,9 @@ dependencies { implementation(projects.boundedContext.place.domain) implementation(projects.boundedContext.place.application) - val coroutineVersion: String by project - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion") + implementation(libs.coroutines.core) - testImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0") + testImplementation(libs.mockito.kotlin) integrationTestImplementation(projects.crossCuttingConcern.test.springIt) integrationTestImplementation("org.springframework.boot:spring-boot-starter-web") diff --git a/app-server/subprojects/bounded_context/quest/domain/build.gradle.kts b/app-server/subprojects/bounded_context/quest/domain/build.gradle.kts index cf4b46bf9..43db8ea2d 100644 --- a/app-server/subprojects/bounded_context/quest/domain/build.gradle.kts +++ b/app-server/subprojects/bounded_context/quest/domain/build.gradle.kts @@ -1,5 +1,4 @@ dependencies { - val jUnitJupiterVersion: String by project - testImplementation("org.junit.jupiter:junit-jupiter-api:$jUnitJupiterVersion") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jUnitJupiterVersion") + testImplementation(libs.junit.jupiter.api) + testRuntimeOnly(libs.junit.jupiter.engine) } diff --git a/app-server/subprojects/bounded_context/quest/infra/build.gradle.kts b/app-server/subprojects/bounded_context/quest/infra/build.gradle.kts index 61f5c7132..9dbb8a42c 100644 --- a/app-server/subprojects/bounded_context/quest/infra/build.gradle.kts +++ b/app-server/subprojects/bounded_context/quest/infra/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - id("org.springframework.boot") - id("io.spring.dependency-management") + alias(libs.plugins.spring.boot) + alias(libs.plugins.spring.dependency.management) } @@ -15,7 +15,6 @@ dependencies { implementation("org.springframework:spring-webflux") // Fixme: 다른 모듈에서는 이거 안 해도 테스트 잘만 도는데...? - val jUnitJupiterVersion: String by project - testImplementation("org.junit.jupiter:junit-jupiter-api:$jUnitJupiterVersion") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jUnitJupiterVersion") + testImplementation(libs.junit.jupiter.api) + testRuntimeOnly(libs.junit.jupiter.engine) } diff --git a/app-server/subprojects/bounded_context/user/infra/build.gradle.kts b/app-server/subprojects/bounded_context/user/infra/build.gradle.kts index 744f15fce..ae407db4d 100644 --- a/app-server/subprojects/bounded_context/user/infra/build.gradle.kts +++ b/app-server/subprojects/bounded_context/user/infra/build.gradle.kts @@ -1,8 +1,8 @@ plugins { - id("org.springframework.boot") - id("io.spring.dependency-management") - kotlin("plugin.serialization") - kotlin("plugin.spring") + alias(libs.plugins.spring.boot) + alias(libs.plugins.spring.dependency.management) + alias(libs.plugins.kotlin.serialization) + alias(libs.plugins.kotlin.spring) } dependencies { @@ -18,10 +18,9 @@ dependencies { implementation("com.auth0:java-jwt:3.18.1") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactive") - val kotlinxSerializationVersion: String by project - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinxSerializationVersion") + implementation(libs.coroutines.reactive) + implementation(libs.kotlin.serialization.json) integrationTestImplementation(projects.crossCuttingConcern.test.springIt) - testImplementation("org.mockito.kotlin:mockito-kotlin:5.1.0") + testImplementation(libs.mockito.kotlin) } diff --git a/app-server/subprojects/cross_cutting_concern/domain/server_event/build.gradle.kts b/app-server/subprojects/cross_cutting_concern/domain/server_event/build.gradle.kts index 163bc9830..3562c5982 100644 --- a/app-server/subprojects/cross_cutting_concern/domain/server_event/build.gradle.kts +++ b/app-server/subprojects/cross_cutting_concern/domain/server_event/build.gradle.kts @@ -1,13 +1,8 @@ dependencies { - val kotlinxSerializationVersion: String by project - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinxSerializationVersion") - - val jacksonModuleKotlinVersion: String by project - implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonModuleKotlinVersion") - + implementation(libs.kotlin.serialization.json) + implementation(libs.jackson.module.kotlin) implementation("org.hibernate.orm:hibernate-core") - val jUnitJupiterVersion: String by project - testImplementation("org.junit.jupiter:junit-jupiter-api:$jUnitJupiterVersion") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jUnitJupiterVersion") + testImplementation(libs.junit.jupiter.api) + testRuntimeOnly(libs.junit.jupiter.engine) } diff --git a/app-server/subprojects/cross_cutting_concern/infra/network/build.gradle.kts b/app-server/subprojects/cross_cutting_concern/infra/network/build.gradle.kts index 78b990a6c..b83da1aa4 100644 --- a/app-server/subprojects/cross_cutting_concern/infra/network/build.gradle.kts +++ b/app-server/subprojects/cross_cutting_concern/infra/network/build.gradle.kts @@ -1,9 +1,7 @@ dependencies { - val kotlinxSerializationVersion: String by project - implementation("org.springframework.boot:spring-boot-starter-web") implementation("org.springframework:spring-webflux") implementation("io.projectreactor.netty:reactor-netty") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinxSerializationVersion") + implementation(libs.kotlin.serialization.json) } diff --git a/app-server/subprojects/cross_cutting_concern/infra/persistence_model/build.gradle.kts b/app-server/subprojects/cross_cutting_concern/infra/persistence_model/build.gradle.kts index 48b6ae30d..f1898726a 100644 --- a/app-server/subprojects/cross_cutting_concern/infra/persistence_model/build.gradle.kts +++ b/app-server/subprojects/cross_cutting_concern/infra/persistence_model/build.gradle.kts @@ -11,15 +11,9 @@ dependencies { implementation(projects.boundedContext.externalAccessibility.domain) implementation(projects.crossCuttingConcern.domain.serverEvent) - val kotlinLoggingVersion: String by project - implementation("io.github.microutils:kotlin-logging-jvm:$kotlinLoggingVersion") - - val flywayVersion: String by project - implementation("org.flywaydb:flyway-core:$flywayVersion") - - val jacksonModuleKotlinVersion: String by project - implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonModuleKotlinVersion") - + implementation(libs.kotlin.logging) + implementation(libs.flyway.core) + implementation(libs.jackson.module.kotlin) implementation("org.springframework.boot:spring-boot-starter-data-jpa") implementation("org.springframework.boot:spring-boot-starter-jdbc") } diff --git a/app-server/subprojects/cross_cutting_concern/infra/spring_message/build.gradle.kts b/app-server/subprojects/cross_cutting_concern/infra/spring_message/build.gradle.kts index 58b9eb4aa..cc0e2a3ca 100644 --- a/app-server/subprojects/cross_cutting_concern/infra/spring_message/build.gradle.kts +++ b/app-server/subprojects/cross_cutting_concern/infra/spring_message/build.gradle.kts @@ -1,17 +1,15 @@ plugins { - id("org.springframework.boot") - id("io.spring.dependency-management") + alias(libs.plugins.spring.boot) + alias(libs.plugins.spring.dependency.management) } dependencies { - val kotlinLoggingVersion: String by project - implementation(projects.crossCuttingConcern.stdlib) implementation("org.springframework.boot:spring-boot-starter-web") implementation("org.springframework.retry:spring-retry") implementation("org.springframework:spring-aspects") - implementation("io.github.microutils:kotlin-logging-jvm:$kotlinLoggingVersion") + implementation(libs.kotlin.logging) testImplementation("org.springframework.boot:spring-boot-starter-test") } diff --git a/app-server/subprojects/cross_cutting_concern/infra/spring_web/build.gradle.kts b/app-server/subprojects/cross_cutting_concern/infra/spring_web/build.gradle.kts index 595ed43ad..d772044f8 100644 --- a/app-server/subprojects/cross_cutting_concern/infra/spring_web/build.gradle.kts +++ b/app-server/subprojects/cross_cutting_concern/infra/spring_web/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - id("org.springframework.boot") - id("io.spring.dependency-management") + alias(libs.plugins.spring.boot) + alias(libs.plugins.spring.dependency.management) } dependencies { @@ -13,13 +13,11 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-data-jpa") implementation("org.springframework.boot:spring-boot-starter-jdbc") api("org.springframework.boot:spring-boot-starter-security") - val kotlinLoggingVersion: String by project - implementation("io.github.microutils:kotlin-logging-jvm:$kotlinLoggingVersion") + implementation(libs.kotlin.logging) + implementation(libs.jackson.module.kotlin) - val jacksonModuleKotlinVersion: String by project - implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonModuleKotlinVersion") integrationTestImplementation(projects.crossCuttingConcern.test.springIt) - integrationTestImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonModuleKotlinVersion") + integrationTestImplementation(libs.jackson.module.kotlin) integrationTestImplementation("org.springframework.boot:spring-boot-starter-test") integrationTestImplementation(projects.crossCuttingConcern.application.serverEvent) } diff --git a/app-server/subprojects/cross_cutting_concern/stdlib/build.gradle.kts b/app-server/subprojects/cross_cutting_concern/stdlib/build.gradle.kts index 51d1757f7..574983d53 100644 --- a/app-server/subprojects/cross_cutting_concern/stdlib/build.gradle.kts +++ b/app-server/subprojects/cross_cutting_concern/stdlib/build.gradle.kts @@ -1,32 +1,26 @@ plugins { - id("com.google.devtools.ksp") + alias(libs.plugins.ksp) } dependencies { - val geoToolsVersion: String by project - val jtsVersion: String by project - val proj4jVersion: String by project - val kopyKatVersion: String by project - val apacheCommonsVersion: String by project - implementation("org.geotools:gt-referencing:$geoToolsVersion") - implementation("org.locationtech.jts:jts-core:$jtsVersion") - implementation("org.locationtech.proj4j:proj4j:$proj4jVersion") - implementation("org.locationtech.proj4j:proj4j-epsg:$proj4jVersion") - implementation("com.auth0:java-jwt:3.18.1") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.11.0") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core") - implementation("org.apache.commons:commons-text:$apacheCommonsVersion") + implementation(libs.geotools.referencing) + implementation(libs.jts.core) + implementation(libs.proj4j.core) + implementation(libs.proj4j.epsg) + implementation(libs.java.jwt) + implementation(libs.jackson.module.kotlin) + implementation(libs.coroutines.core) + implementation(libs.apache.commons.text) api("jakarta.persistence:jakarta.persistence-api") api("org.springframework.data:spring-data-commons") implementation("org.hibernate.orm:hibernate-core") - ksp("at.kopyk:kopykat-ksp:$kopyKatVersion") - compileOnly("at.kopyk:kopykat-annotations:$kopyKatVersion") + ksp(libs.kopykat.ksp) + compileOnly(libs.kopykat.annotations) - val jUnitJupiterVersion: String by project - testImplementation("org.junit.jupiter:junit-jupiter-api:$jUnitJupiterVersion") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jUnitJupiterVersion") + testImplementation(libs.junit.jupiter.api) + testRuntimeOnly(libs.junit.jupiter.engine) } ksp { diff --git a/app-server/subprojects/cross_cutting_concern/test/spring_it/build.gradle.kts b/app-server/subprojects/cross_cutting_concern/test/spring_it/build.gradle.kts index f4cb06441..e9738db37 100644 --- a/app-server/subprojects/cross_cutting_concern/test/spring_it/build.gradle.kts +++ b/app-server/subprojects/cross_cutting_concern/test/spring_it/build.gradle.kts @@ -1,16 +1,15 @@ plugins { - id("io.spring.dependency-management") - id("org.springframework.boot") + alias(libs.plugins.spring.dependency.management) + alias(libs.plugins.spring.boot) } dependencies { api("org.springframework.boot:spring-boot-starter-test") implementation("org.springframework.boot:spring-boot-starter-web") - implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.12.3") + implementation(libs.jackson.module.kotlin) runtimeOnly("com.zaxxer:HikariCP") - val postgresqlVersion: String by project - runtimeOnly("org.postgresql:postgresql:$postgresqlVersion") + runtimeOnly(libs.postgresql) runtimeOnly("org.springframework:spring-jdbc") val dependencyHandlerScope = this diff --git a/app-server/subprojects/deploying_apps/local_script/build.gradle.kts b/app-server/subprojects/deploying_apps/local_script/build.gradle.kts index fef43e1c6..e7ce4eb30 100644 --- a/app-server/subprojects/deploying_apps/local_script/build.gradle.kts +++ b/app-server/subprojects/deploying_apps/local_script/build.gradle.kts @@ -1,15 +1,12 @@ -val coroutineVersion: String by project -val kotlinxSerializationVersion: String by project - dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactive") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinxSerializationVersion") + implementation(libs.coroutines.core) + implementation(libs.coroutines.reactive) + implementation(libs.kotlin.serialization.json) - implementation("org.springframework.boot:spring-boot-starter-web:3.0.5") + implementation("org.springframework.boot:spring-boot-starter-web") // implementation("org.springframework:spring-web:6.0.7") - implementation("org.springframework:spring-webflux:6.0.7") - implementation("io.projectreactor.netty:reactor-netty:1.1.5") + implementation("org.springframework:spring-webflux") + implementation("io.projectreactor.netty:reactor-netty") implementation("com.github.kittinunf.fuel:fuel:2.3.1") implementation(projects.crossCuttingConcern.stdlib) diff --git a/app-server/subprojects/deploying_apps/scc_server/build.gradle.kts b/app-server/subprojects/deploying_apps/scc_server/build.gradle.kts index 512539117..c13533ace 100644 --- a/app-server/subprojects/deploying_apps/scc_server/build.gradle.kts +++ b/app-server/subprojects/deploying_apps/scc_server/build.gradle.kts @@ -1,14 +1,12 @@ import com.google.cloud.tools.jib.api.buildplan.ImageFormat.Docker plugins { - id("org.springframework.boot") - id("io.spring.dependency-management") - id("com.google.cloud.tools.jib") + alias(libs.plugins.spring.boot) + alias(libs.plugins.spring.dependency.management) + alias(libs.plugins.jib) } dependencies { - val postgresqlVersion: String by project - annotationProcessor("org.springframework.boot:spring-boot-configuration-processor") implementation("org.springframework.boot:spring-boot-starter-web") implementation("org.springframework.boot:spring-boot-starter-actuator") @@ -16,15 +14,9 @@ dependencies { implementation("io.micrometer:micrometer-registry-prometheus") implementation("com.zaxxer:HikariCP") - runtimeOnly("org.postgresql:postgresql:$postgresqlVersion") - - val sentryVersion: String by project - runtimeOnly("io.sentry:sentry-spring-boot-starter-jakarta:$sentryVersion") - runtimeOnly("io.sentry:sentry-logback:$sentryVersion") - - val logbackJsonVersion: String by project - runtimeOnly("ch.qos.logback.contrib:logback-jackson:$logbackJsonVersion") - runtimeOnly("ch.qos.logback.contrib:logback-json-classic:$logbackJsonVersion") + runtimeOnly(libs.postgresql) + runtimeOnly(libs.bundles.sentry) + runtimeOnly(libs.bundles.logback) implementation(projects.crossCuttingConcern.infra.springWeb) implementation(projects.crossCuttingConcern.infra.springMessage)