Skip to content

Commit

Permalink
[#214/refactor] gradle 디펜던시 점검 (#220)
Browse files Browse the repository at this point in the history
* refactor: 사용하지 않는 의존성 정리 및 테스크 추가

* refactor: 테스크 연결 방식 수정
  • Loading branch information
belljun3395 authored Jul 21, 2024
1 parent 254b299 commit 85136c9
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 22 deletions.
7 changes: 7 additions & 0 deletions api-repo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ dependencies {
api("org.springframework.boot:spring-boot-starter-data-jdbc")
implementation("com.mysql:mysql-connector-j")

/** jooq */
implementation("org.springframework.boot:spring-boot-starter-jooq")
implementation("org.jooq:jooq:${DependencyVersion.JOOQ}")
implementation("org.jooq:jooq-meta:${DependencyVersion.JOOQ}")
implementation("org.jooq:jooq-codegen:${DependencyVersion.JOOQ}")
jooqCodegen("org.jooq:jooq-meta-extensions:${DependencyVersion.JOOQ}")

/** flyway */
implementation("org.flywaydb:flyway-core:${DependencyVersion.FLYWAY}")
implementation("org.flywaydb:flyway-mysql")
Expand Down
8 changes: 8 additions & 0 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-actuator")

/** jooq */
implementation("org.springframework.boot:spring-boot-starter-jooq")
implementation("org.jooq:jooq:${DependencyVersion.JOOQ}")
implementation("org.jooq:jooq-meta:${DependencyVersion.JOOQ}")
implementation("org.jooq:jooq-codegen:${DependencyVersion.JOOQ}")
jooqCodegen("org.jooq:jooq-meta-extensions:${DependencyVersion.JOOQ}")

/** swagger & restdocs */
implementation("org.springdoc:springdoc-openapi-ui:${DependencyVersion.SPRINGDOC}")
implementation("org.springframework.restdocs:spring-restdocs-webtestclient")
implementation("org.springframework.restdocs:spring-restdocs-mockmvc")
implementation("com.epages:restdocs-api-spec-mockmvc:${DependencyVersion.EPAGES_REST_DOCS_API_SPEC}")
swaggerUI("org.webjars:swagger-ui:${DependencyVersion.SWAGGER_UI}")

/** test container */
implementation(platform("org.testcontainers:testcontainers-bom:${DependencyVersion.TEST_CONTAINER}"))
Expand Down
25 changes: 10 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,6 @@ subprojects {
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")

/** jooq */
implementation("org.springframework.boot:spring-boot-starter-jooq")
implementation("org.jooq:jooq:${DependencyVersion.JOOQ}")
implementation("org.jooq:jooq-meta:${DependencyVersion.JOOQ}")
implementation("org.jooq:jooq-codegen:${DependencyVersion.JOOQ}")
jooqCodegen("org.jooq:jooq-meta-extensions:${DependencyVersion.JOOQ}")

/** test **/
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("io.mockk:mockk:${DependencyVersion.MOCKK}")
Expand All @@ -111,9 +104,6 @@ subprojects {
testImplementation("io.kotest.extensions:kotest-extensions-spring:${DependencyVersion.KOTEST_EXTENSION}")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:${DependencyVersion.COROUTINE_TEST}")

/** swagger */
swaggerUI("org.webjars:swagger-ui:${DependencyVersion.SWAGGER_UI}")

/** Kotlin Logger **/
implementation("io.github.oshai:kotlin-logging-jvm:${DependencyVersion.KOTLIN_LOGGING}")
}
Expand All @@ -135,14 +125,20 @@ subprojects {
}
}

/** do all copy data migration */
tasks.register("copyDataMigrationAll") {
dependsOn(":api-repo:copyDataMigration")
dependsOn(":batch:copyDataMigration")
}

/** copy data migration before compile kotlin */
tasks.getByName("compileKotlin") {
dependsOn("copyDataMigration")
tasks.compileKotlin {
dependsOn("copyDataMigrationAll")
}

/** jooq codegen after copy data migration */
tasks.getByName("jooqCodegen") {
dependsOn("copyDataMigration")
tasks.jooqCodegen {
dependsOn("copyDataMigrationAll")
}

jooq {
Expand Down Expand Up @@ -219,7 +215,6 @@ subprojects {

/** do all jooq codegen */
tasks.register("jooqCodegenAll") {
dependsOn(":api:jooqCodegen")
dependsOn(":api-repo:jooqCodegen")
dependsOn(":batch:jooqCodegen")
}
Expand Down
1 change: 1 addition & 0 deletions email/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tasks.getByName("jar") {
}

dependencies {
/** starter */
implementation("org.springframework.boot:spring-boot-starter-mail")
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
}
8 changes: 3 additions & 5 deletions storage/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ tasks.getByName("jar") {
}

dependencies {
// minio - local
implementation("io.minio:minio:${DependencyVersion.MINIO}")
// s3
/** aws - s3 */
implementation("com.amazonaws:aws-java-sdk-s3:${DependencyVersion.AWS_SDK}")

// commonmark - markdown to html
/** commonmark - markdown to html */
implementation("org.commonmark:commonmark:${DependencyVersion.COMMONMARK}")

// jsoup
/** jsoup - html parser */
implementation("org.jsoup:jsoup:1.15.3")
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.few.storage.image.client.util
import com.few.storage.image.client.dto.ImageGetPreSignedObjectUrlArgs
import com.few.storage.image.client.dto.ImagePutObjectArgs
import com.few.storage.image.client.dto.ImageRemoveObjectArgs
import io.minio.http.Method
import org.apache.http.entity.ContentType
import java.io.BufferedInputStream
import java.io.File
Expand All @@ -12,7 +11,7 @@ import java.io.FileInputStream
class ImageArgsGenerator {
companion object {
fun preSignedUrl(bucket: String, image: String): ImageGetPreSignedObjectUrlArgs {
return ImageGetPreSignedObjectUrlArgs(bucket, image, Method.GET.toString())
return ImageGetPreSignedObjectUrlArgs(bucket, image, "GET")
}

fun putImage(bucket: String, name: String, image: File): ImagePutObjectArgs {
Expand Down

0 comments on commit 85136c9

Please sign in to comment.