import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { id("org.springframework.boot") version "4.1.0" id("org.jetbrains.kotlin.jvm") version "2.4.10" id("org.jetbrains.kotlin.plugin.spring") version "2.4.10" id("org.jetbrains.kotlin.plugin.serialization") version "2.4.10" jacoco } group = "pw.binom" version = "0.0.1-SNAPSHOT" java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_21 freeCompilerArgs.add("-Xjsr305=strict") } } dependencies { implementation(platform("org.springframework.boot:spring-boot-dependencies:4.1.0")) implementation("org.springframework.boot:spring-boot-starter-webmvc") { exclude(group = "org.springframework.boot", module = "spring-boot-starter-jackson") } implementation(kotlin("reflect")) implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.11.0") implementation("org.springframework.boot:spring-boot-starter-jdbc") implementation("org.springframework.boot:spring-boot-starter-flyway") implementation("org.springframework.boot:spring-boot-starter-actuator") implementation("org.springframework.boot:spring-boot-starter-validation") implementation("org.postgresql:postgresql") implementation("org.flywaydb:flyway-database-postgresql") implementation(platform("software.amazon.awssdk:bom:2.46.21")) implementation("software.amazon.awssdk:s3") testImplementation(platform("org.springframework.boot:spring-boot-dependencies:4.1.0")) testImplementation("org.springframework.boot:spring-boot-starter-test") testImplementation("org.springframework.boot:spring-boot-webmvc-test") 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") } tasks.withType { useJUnitPlatform() finalizedBy(tasks.jacocoTestReport) } tasks.named("bootJar") { archiveFileName.set("media-mirror-api.jar") } tasks.jacocoTestReport { dependsOn(tasks.test) reports { xml.required = true html.required = true } } tasks.jacocoTestCoverageVerification { dependsOn(tasks.test) violationRules { rule { limit { counter = "LINE" value = "COVEREDRATIO" minimum = "0.80".toBigDecimal() } } } } tasks.check { dependsOn(tasks.jacocoTestCoverageVerification) }