22// Licensed under the MIT license.
33import com.diffplug.gradle.spotless.SpotlessExtension
44import io.gitlab.arturbosch.detekt.Detekt
5+ import kotlinx.kover.gradle.plugin.dsl.KoverProjectExtension
56import org.gradle.kotlin.dsl.implementation
67
78plugins {
8- val kotlinVersion = " 1.9.23 "
9+ val kotlinVersion = " 2.0.21 "
910 kotlin(" jvm" ) version kotlinVersion
1011 id(" com.diffplug.spotless" ) version " 7.0.2"
11- id(" org.springframework.boot" ) version " 3.4.1 " apply false
12+ id(" org.springframework.boot" ) version " 3.4.4 " apply false
1213 id(" io.gitlab.arturbosch.detekt" ) version " 1.23.8"
1314 id(" pl.allegro.tech.build.axion-release" ) version " 1.18.18"
14- id(" org.jetbrains.kotlinx.kover" ) version " 0.7.6 "
15+ id(" org.jetbrains.kotlinx.kover" ) version " 0.9.1 "
1516 id(" project-report" )
1617 `maven- publish`
1718 // Apply the java-library plugin for API and implementation separation.
@@ -28,7 +29,11 @@ project.version = scmVersion.version
2829
2930val kotlinJvmTarget = 21
3031
31- java { toolchain { languageVersion.set(JavaLanguageVersion .of(kotlinJvmTarget)) } }
32+ java {
33+ targetCompatibility = JavaVersion .VERSION_21
34+ sourceCompatibility = JavaVersion .VERSION_21
35+ toolchain { languageVersion.set(JavaLanguageVersion .of(kotlinJvmTarget)) }
36+ }
3237
3338publishing {
3439 repositories {
@@ -155,28 +160,30 @@ val springWebVersion = "6.2.1"
155160val springBootVersion = " 3.4.1"
156161
157162// Implementation
158- val swaggerParserVersion = " 2.1.24 "
163+ val swaggerParserVersion = " 2.1.25 "
159164val hashidsVersion = " 1.0.3"
160165val springOauthAutoConfigureVersion = " 2.6.8"
161166val springSecurityJwtVersion = " 1.1.1.RELEASE"
162167val springDocVersion = " 2.8.6"
163- val springOauthVersion = " 6.4.2 "
168+ val springOauthVersion = " 6.4.4 "
164169val servletApiVersion = " 6.1.0"
165170val oktaSpringBootVersion = " 3.0.7"
166171val tikaVersion = " 3.1.0"
167- val redisOMVersion = " 0.9.1 "
168- val kotlinCoroutinesCoreVersion = " 1.8.1 "
172+ val redisOMVersion = " 0.9.10 "
173+ val kotlinCoroutinesCoreVersion = " 1.10.2 "
169174
170175// Checks
171- val detektVersion = " 1.23.7 "
176+ val detektVersion = " 1.23.8 "
172177
173178// Tests
174- val jUnitBomVersion = " 5.10.0 "
179+ val jUnitBomVersion = " 5.12.1 "
175180val mockkVersion = " 1.13.17"
176- val awaitilityKVersion = " 4.2.2 "
181+ val awaitilityKVersion = " 4.3.0 "
177182val testcontainersRedis = " 1.6.4"
178183
179184dependencies {
185+ // https://youtrack.jetbrains.com/issue/KT-71057/POM-file-unusable-after-upgrading-to-2.0.20-from-2.0.10
186+ implementation(platform(" org.jetbrains.kotlin:kotlin-bom:2.0.21" ))
180187 implementation(platform(org.springframework.boot.gradle.plugin.SpringBootPlugin .BOM_COORDINATES ))
181188
182189 detekt(" io.gitlab.arturbosch.detekt:detekt-cli:$detektVersion " )
@@ -213,7 +220,7 @@ dependencies {
213220 }
214221
215222 implementation(" org.springdoc:springdoc-openapi-starter-webmvc-ui:${springDocVersion} " )
216- implementation(" com.fasterxml.jackson.module:jackson-module-kotlin:2.18.3 " )
223+ implementation(" com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion " )
217224
218225 implementation(" jakarta.servlet:jakarta.servlet-api:${servletApiVersion} " )
219226 implementation(" com.okta.spring:okta-spring-boot-starter:${oktaSpringBootVersion} " )
@@ -224,9 +231,7 @@ dependencies {
224231
225232 implementation(" org.apache.tika:tika-core:${tikaVersion} " )
226233 implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesCoreVersion " )
227- implementation(" com.redis.om:redis-om-spring:${redisOMVersion} " ) {
228- constraints { implementation(" ai.djl:api:0.28.0" ) }
229- }
234+ implementation(" com.redis.om:redis-om-spring:${redisOMVersion} " )
230235
231236 implementation(" com.redis.testcontainers:testcontainers-redis-junit:$testcontainersRedis " )
232237 implementation(" org.springframework.boot:spring-boot-starter-test" )
@@ -246,16 +251,23 @@ dependencies {
246251 annotationProcessor(" org.springframework.boot:spring-boot-configuration-processor" )
247252}
248253
249- extensions.configure< kotlinx.kover.gradle.plugin.dsl.KoverReportExtension > {
250- defaults {
251- // reports configs for XML, HTML, verify reports
254+ extensions.configure<KoverProjectExtension >(" kover" ) {
255+ reports {
256+ filters {
257+ includes {
258+ packages(" com.cosmotech.api" )
259+ classes(" com.cosmotech.api.id.*" )
260+ classes(" com.cosmotech.api.rbac.*" )
261+ classes(" com.cosmotech.utils.*" )
262+ }
263+ }
252264 }
253- filters {
254- includes {
255- packages( " com.cosmotech.api " )
256- classes( " com.cosmotech.api.id.* " )
257- classes( " com.cosmotech.api.rbac.* " )
258- classes( " com.cosmotech.utils.* " )
265+ }
266+
267+ kover {
268+ reports {
269+ total {
270+ // reports configs for XML, HTML, verify reports
259271 }
260272 }
261273}
0 commit comments