build.gradle.kts 1.78 KB
plugins {
    alias(libs.plugins.kotlin.jvm)
    alias(libs.plugins.kotlin.spring)
    alias(libs.plugins.kotlin.jpa)
    alias(libs.plugins.spring.dependency.management)
}

description = "vibe_erp pbc-finance — minimal AR/AP journal entries driven by domain events from sales and purchase orders. INTERNAL Packaged Business Capability."

java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(21))
    }
}

kotlin {
    jvmToolchain(21)
    compilerOptions {
        freeCompilerArgs.add("-Xjsr305=strict")
    }
}

allOpen {
    annotation("jakarta.persistence.Entity")
    annotation("jakarta.persistence.MappedSuperclass")
    annotation("jakarta.persistence.Embeddable")
}

// pbc-finance is the framework's first CONSUMER PBC: it doesn't expose
// any cross-PBC service of its own (yet) but instead reacts to events
// published by other PBCs through api.v1.event.orders.*. Like every
// other PBC, it must NOT depend on another pbc-* — the dependency rule
// is enforced by the root build. Inbound events arrive via the
// platform-events EventBus interface defined in api.v1.
dependencies {
    api(project(":api:api-v1"))
    implementation(project(":platform:platform-persistence"))
    implementation(project(":platform:platform-security"))

    implementation(libs.kotlin.stdlib)
    implementation(libs.kotlin.reflect)

    implementation(libs.spring.boot.starter)
    implementation(libs.spring.boot.starter.web)
    implementation(libs.spring.boot.starter.data.jpa)
    implementation(libs.spring.boot.starter.validation)
    implementation(libs.jackson.module.kotlin)

    testImplementation(libs.spring.boot.starter.test)
    testImplementation(libs.junit.jupiter)
    testImplementation(libs.assertk)
    testImplementation(libs.mockk)
}

tasks.test {
    useJUnitPlatform()
}