1- import org.gradle.kotlin.dsl.withType
2- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3- import kotlin.collections.plus
4-
51plugins {
6- kotlin(" jvm" ) version " 1.9.23"
7- kotlin(" plugin.spring" ) version " 1.9.23"
8- id(" org.springframework.boot" ) version " 3.4.4"
9- id(" io.spring.dependency-management" ) version " 1.1.7"
10- id(" org.jlleitschuh.gradle.ktlint" ).version(" 12.1.1" )
11- id(" io.gitlab.arturbosch.detekt" ) version " 1.23.6"
12- id(" casper.documentation-convention" )
2+ id(Plugin .KOTLIN_JVM ) version PluginVersion .KOTLIN_VERSION apply false
3+ id(Plugin .DETEKT ) version PluginVersion .DETEKT_VERSION
4+ id(Plugin .KTLINT ) version PluginVersion .KTLINT_VERSION apply false
135}
146
15- // 서브프로젝트 설정
167subprojects {
17- // 서브프로젝트에 공통 설정 적용
18- repositories {
19- mavenCentral()
20- }
8+ group = " hs.kr.entrydsm"
9+ version = " 0.0.1"
10+
11+ apply (plugin = Plugin .KTLINT )
12+
2113}
2214
2315tasks.register(" checkAll" ) {
2416 group = " verification"
2517 description = " 모든 모듈(includeBuild 포함)에 대해 check 태스크를 실행합니다"
2618
27- // 루트 프로젝트의 check 태스크에 의존
28- dependsOn(tasks.named(" check" ))
2919
30- // 모든 서브프로젝트의 check 태스크에 의존
3120 subprojects.forEach { subproject ->
3221 dependsOn(subproject.tasks.matching { it.name.startsWith(" check" ) })
3322 }
3423
35- // build-logic, convention 등 includeBuild 모듈의 check 태스크에 의존
36- dependsOn(gradle.includedBuilds.map { it.task(" :check" ) })
37- }
38-
39- group = " hs.kr.entrydsm"
40- version = " 0.0.1-SNAPSHOT"
41-
42- dependencies {
43-
44- implementation(" org.springframework.boot:spring-boot-starter" )
45- implementation(" org.jetbrains.kotlin:kotlin-reflect" )
46- testImplementation(" org.springframework.boot:spring-boot-starter-test" )
47- testImplementation(" org.jetbrains.kotlin:kotlin-test-junit5" )
48- testRuntimeOnly(" org.junit.platform:junit-platform-launcher" )
49- }
5024
51- kotlin {
52- jvmToolchain(17 )
53- }
54-
55- tasks.withType<KotlinCompile > {
56- kotlinOptions {
57- freeCompilerArgs + = " -Xjsr305=strict"
58- }
59- }
60-
61- tasks.withType<Test > {
62- useJUnitPlatform()
25+ dependsOn(gradle.includedBuilds.map { it.task(" :check" ) })
6326}
6427
6528detekt {
6629 config.setFrom(files(" detekt.yml" ))
67- buildUponDefaultConfig = false // yml에서 설정한 룰만 허용
68- parallel = true // 병렬 실행으로 성능 최적화
30+ buildUponDefaultConfig = false
31+ parallel = true
6932}
7033
7134tasks.withType< io.gitlab.arturbosch.detekt.Detekt > ().configureEach {
@@ -74,5 +37,8 @@ tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
7437 txt.required.set(false )
7538 }
7639
77- jvmTarget = ( " 17" ) // Detekt가 사용하는 JVM 타겟을 Java 17로 지정
40+ jvmTarget = " 17"
7841}
42+
43+
44+
0 commit comments