import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { kotlin("jvm") version "2.4.10" kotlin("plugin.serialization") version "2.4.10" id("org.springframework.boot") version "4.1.0" jacoco } group = "pw.binom.mirror.worker" version = "1.0.0-SNAPSHOT" java { sourceCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21 } kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_21 freeCompilerArgs.add("-Xjsr305=strict") } } configurations { named("runtimeClasspath") { exclude(group = "tools.jackson.core") exclude(group = "tools.jackson.databind") exclude(group = "com.fasterxml.jackson.core") exclude(group = "com.fasterxml.jackson.databind") exclude(group = "com.fasterxml.jackson.datatype") exclude(group = "com.fasterxml.jackson.dataformat") exclude(group = "com.fasterxml.jackson.module") } } configurations.all { resolutionStrategy { force("org.testcontainers:testcontainers:1.21.4") force("org.testcontainers:junit-jupiter:1.21.4") force("org.testcontainers:postgresql:1.21.4") force("org.testcontainers:minio:1.21.4") } } dependencies { implementation(platform("org.springframework.boot:spring-boot-dependencies:4.1.0")) implementation("org.springframework.boot:spring-boot-starter-webmvc") implementation("org.springframework.boot:spring-boot-starter-jdbc") implementation("org.springframework.boot:spring-boot-starter-flyway") implementation("org.flywaydb:flyway-database-postgresql") implementation("org.postgresql:postgresql") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.11.0") implementation(platform("software.amazon.awssdk:bom:2.46.21")) implementation("software.amazon.awssdk:s3") testImplementation("org.springframework.boot:spring-boot-starter-test") testImplementation(kotlin("test-junit5")) testImplementation("org.testcontainers:testcontainers:1.21.4") testImplementation("org.testcontainers:junit-jupiter:1.21.4") testImplementation("org.testcontainers:postgresql:1.21.4") testImplementation("org.testcontainers:minio:1.21.4") testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.2") } tasks.withType { useJUnitPlatform() maxParallelForks = 1 testLogging { showStandardStreams = true events("passed", "failed", "skipped") } } tasks.withType { exclude("META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA") } tasks.jacocoTestReport { dependsOn(tasks.test) reports { xml.required.set(true) html.required.set(true) } } tasks.jacocoTestCoverageVerification { dependsOn(tasks.jacocoTestReport) violationRules { rule { element = "PACKAGE" includes = listOf("pw.binom.mirror.worker.convert") limit { counter = "LINE" value = "COVEREDRATIO" minimum = "0.80".toBigDecimal() } } } } tasks.check { dependsOn(tasks.jacocoTestReport, tasks.jacocoTestCoverageVerification) }