plugins {
    kotlin("jvm")
    kotlin("plugin.jpa")   // all-open + no-arg for @Entity (Kotlin classes are final by default)
    id("io.spring.dependency-management")
}

dependencyManagement {
    imports {
        mavenBom("org.springframework.boot:spring-boot-dependencies:3.3.4")
    }
}

dependencies {
    implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
    implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml")
    // JPA annotations only (entities shared across ledger services); runtime provided by services.
    compileOnly("jakarta.persistence:jakarta.persistence-api")
    // 로그 -> Logstash(TCP json). 공유 logback-spring.xml과 함께 전 서비스에 전파(runtime).
    implementation("net.logstash.logback:logstash-logback-encoder:7.4")
    implementation("io.micrometer:micrometer-registry-prometheus") // 메트릭(B4)
    // 하트비트 자동설정(B5) 컴파일용 — 런타임은 각 서비스가 제공
    compileOnly("org.springframework.boot:spring-boot-autoconfigure")
    compileOnly("org.springframework:spring-context")
    compileOnly("org.springframework:spring-jdbc")
    compileOnly("org.slf4j:slf4j-api")
    testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
    testImplementation("org.junit.jupiter:junit-jupiter")
    testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
