plugins { kotlin("jvm") version "2.2.21" kotlin("plugin.spring") version "2.2.21" id("org.springframework.boot") version "4.1.0-M2" id("io.spring.dependency-management") version "1.1.7" id("org.jlleitschuh.gradle.ktlint") version "12.1.0" } group = "io.visus.demos" version = "0.0.1-SNAPSHOT" description = "kotlin-api" java { toolchain { languageVersion = JavaLanguageVersion.of(21) } } repositories { mavenCentral() } ktlint { version.set("1.4.1") android.set(false) ignoreFailures.set(false) reporters { reporter(org.jlleitschuh.gradle.ktlint.reporter.ReporterType.PLAIN) } filter { exclude("**/build/**") exclude("**/generated/**") } } dependencies { implementation("tools.jackson.core:jackson-core:3.1.0") implementation("tools.jackson.core:jackson-databind:3.1.0") implementation("tools.jackson.module:jackson-module-kotlin:3.1.0") implementation("org.springframework.boot:spring-boot-starter-mongodb") implementation("org.springframework.boot:spring-boot-starter-restclient") implementation("org.springframework.boot:spring-boot-starter-security") implementation("org.springframework.boot:spring-boot-starter-webmvc") implementation("org.jetbrains.kotlin:kotlin-reflect") implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.4") testImplementation("org.springframework.boot:spring-boot-starter-mongodb-test") testImplementation("org.springframework.boot:spring-boot-starter-restclient-test") testImplementation("org.springframework.boot:spring-boot-starter-security-test") testImplementation("org.springframework.boot:spring-boot-starter-webmvc-test") testImplementation("org.jetbrains.kotlin:kotlin-test-junit5") testRuntimeOnly("org.junit.platform:junit-platform-launcher") } configurations.all { resolutionStrategy.eachDependency { if (requested.group == "tools.jackson.core") { useVersion("3.1.0") } if (requested.group == "com.fasterxml.jackson.core") { if (requested.name == "jackson-annotations") { useVersion("2.21") } else { useVersion("2.21.1") } } } } kotlin { compilerOptions { freeCompilerArgs.addAll("-Xjsr305=strict", "-Xannotation-default-target=param-property") } } tasks.withType { useJUnitPlatform() } tasks.named("check") { dependsOn("ktlintCheck") }