generated from pricelees/issue-pr-template
<!-- 제목 양식 --> <!-- [이슈번호] 작업 요약 (예시: [#10] Gitea 템플릿 생성) --> ## 📝 관련 이슈 및 PR **PR과 관련된 이슈 번호** - #1 ## ✨ 작업 내용 <!-- 어떤 작업을 했는지 알려주세요! --> ### 1. 코틀린 의존성 추가 및 정상 작동 확인 - Kotest, RestAssured Extension 등 코틀린 관련 플러그인 추가 ### 2. View 관련 코드 코틀린 마이그레이션 - 애플리케이션에서는 3개 클래스 78 라인 -> 단일 클래스 48 라인으로 코드량 감소 - 테스트에서는 3개 클래스 344 라인 -> 단일 클래스 161 라인으로 코드량 감소 ## 🧪 테스트 <!-- 어떤 테스트를 생각했고 진행했는지 알려주세요! --> 코틀린 마이그레이션 이후 테스트 진행 및 기존 테스트와 동일한 커버리지가 나오는 것을 확인하였음. ## 📚 참고 자료 및 기타 <!-- 참고한 자료, 또는 논의할 사항이 있다면 알려주세요! --> Reviewed-on: #2 Co-authored-by: pricelees <priceelees@gmail.com> Co-committed-by: pricelees <priceelees@gmail.com>
82 lines
2.5 KiB
Plaintext
82 lines
2.5 KiB
Plaintext
plugins {
|
|
val springBootVersion = "3.5.3"
|
|
val kotlinVersion = "2.2.0"
|
|
|
|
java
|
|
id("org.springframework.boot") version springBootVersion
|
|
id("io.spring.dependency-management") version "1.1.7"
|
|
|
|
//kotlin plugins
|
|
kotlin("jvm") version kotlinVersion
|
|
kotlin("plugin.spring") version kotlinVersion
|
|
kotlin("plugin.jpa") version kotlinVersion
|
|
kotlin("kapt") version kotlinVersion
|
|
}
|
|
|
|
group = "com.sangdol"
|
|
version = "0.0.1-SNAPSHOT"
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
// spring
|
|
implementation("org.springframework.boot:spring-boot-starter-web")
|
|
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
|
|
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
|
|
implementation("org.springframework.boot:spring-boot-starter-validation")
|
|
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0")
|
|
runtimeOnly("com.h2database:h2")
|
|
|
|
// jwt
|
|
implementation("io.jsonwebtoken:jjwt:0.9.1")
|
|
implementation("javax.xml.bind:jaxb-api:2.3.1")
|
|
|
|
// kotlin
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
|
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
|
implementation("io.github.oshai:kotlin-logging-jvm:7.0.3")
|
|
|
|
// test
|
|
testImplementation("io.mockk:mockk:1.14.4")
|
|
testImplementation("io.kotest:kotest-runner-junit5:5.9.1")
|
|
testImplementation("io.kotest.extensions:kotest-extensions-spring:1.3.0")
|
|
testImplementation("com.ninja-squad:springmockk:4.0.2")
|
|
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
testImplementation("io.rest-assured:rest-assured:5.3.1")
|
|
testImplementation("io.rest-assured:kotlin-extensions:5.5.5")
|
|
}
|
|
|
|
kapt {
|
|
keepJavacAnnotationProcessors = true
|
|
}
|
|
|
|
tasks.withType<Test>().configureEach {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
tasks {
|
|
compileKotlin {
|
|
compilerOptions {
|
|
freeCompilerArgs.add("-Xjsr305=strict")
|
|
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
|
|
freeCompilerArgs.set(listOf("-Xannotation-default-target=param-property"))
|
|
|
|
}
|
|
}
|
|
|
|
compileTestKotlin {
|
|
compilerOptions {
|
|
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
|
|
freeCompilerArgs.set(listOf("-Xannotation-default-target=param-property"))
|
|
}
|
|
}
|
|
} |