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

description = "vibe_erp JasperReports-backed PDF rendering. Adapts Jasper to the api.v1 ReportRenderer contract. INTERNAL."

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

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

// Only module that pulls JasperReports in. JasperReports has a
// notoriously heavy transitive dep tree (POI for Excel, Batik for
// SVG, Groovy for expressions, commons-digester, Apache Velocity,
// ...) — most of it is only needed for features we don't use.
// Aggressive exclusions keep the distribution jar from ballooning.
dependencies {
    api(project(":api:api-v1"))
    implementation(project(":platform:platform-security")) // @RequirePermission on the controller

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

    implementation(libs.spring.boot.starter)
    implementation(libs.spring.boot.starter.web)

    // JasperReports itself. Transitive deps left intact —
    // aggressive exclusions break template loading because Jasper
    // uses commons-digester for XML parsing internally. The
    // dep tree IS heavy, but that's the cost of PDF rendering
    // in a v1.0 framework; optimising belongs to a future chunk
    // with benchmark data.
    implementation(libs.jasperreports)

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

tasks.test {
    useJUnitPlatform()
}