1- import io.gitlab.arturbosch. detekt.Detekt
2- import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21
3- import org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0
4- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1+ import dev. detekt.gradle .Detekt
2+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_25
3+ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_3
4+
55
66plugins {
77 // spring
8- id(" org.springframework.boot" ) version " 4.0.1 "
8+ id(" org.springframework.boot" ) version " 4.0.2 "
99 id(" io.spring.dependency-management" ) version " 1.1.7"
1010
1111 // detekt
12- id(" dev.detekt" ) version " 2.0.0-alpha.1 "
12+ id(" dev.detekt" ) version " 2.0.0-alpha.2 "
1313
1414 // kotlin things
1515 kotlin(" jvm" ) version " 2.3.0"
@@ -20,75 +20,56 @@ plugins {
2020group = " br.com.webbudget"
2121version = " 4.0.0"
2222
23- java.sourceCompatibility = JavaVersion .VERSION_21
24-
25- springBoot {
26- buildInfo {
27- properties {
28- group.set(project.group as String )
29- version.set(project.version as String )
30- artifact.set(project.name)
31-
32- description = " webBudget backend application"
33-
34- name.set(" webBudget Backend" )
35- }
36- }
37- }
23+ java.sourceCompatibility = JavaVersion .VERSION_25
3824
3925repositories {
4026 mavenCentral()
4127}
4228
43- val testcontainersVersion = " 1.21.0 "
44- val guavaVersion = " 33.4.8 -jre"
45- val assertJVersion = " 3.27.3 "
46- val mockkVersion = " 4 .0.2 "
47- val jsonUnitVersion = " 4 .1.1 "
29+ val testcontainersVersion = " 2.0.2 "
30+ val guavaVersion = " 33.5.0 -jre"
31+ val assertJVersion = " 3.27.7 "
32+ val mockkVersion = " 5 .0.1 "
33+ val jsonUnitVersion = " 5 .1.0 "
4834val awaitilityVersion = " 4.3.0"
49- val hypersistenceUtilsVersion = " 3.9.10"
50- val kotlinLoggingJvmVersion = " 7.0.7"
35+ val hypersistenceUtilsVersion = " 3.15.1"
5136val greenMailVersion = " 2.1.3"
37+ val kotlinLoggingJvmVersion = " 7.0.14"
5238
5339dependencies {
5440 // spring
55- implementation(" org.springframework.boot:spring-boot-starter-web " )
41+ implementation(" org.springframework.boot:spring-boot-starter-webmvc " )
5642 implementation(" org.springframework.boot:spring-boot-starter-data-jpa" )
5743 implementation(" org.springframework.boot:spring-boot-starter-security" )
44+ implementation(" org.springframework.boot:spring-boot-starter-liquibase" )
5845 implementation(" org.springframework.boot:spring-boot-starter-oauth2-resource-server" )
5946 implementation(" org.springframework.boot:spring-boot-starter-actuator" )
6047 implementation(" org.springframework.boot:spring-boot-starter-validation" )
6148 implementation(" org.springframework.boot:spring-boot-starter-mail" )
6249 implementation(" org.springframework.boot:spring-boot-starter-thymeleaf" )
6350
51+ developmentOnly(" org.springframework.boot:spring-boot-devtools" )
52+ annotationProcessor(" org.springframework.boot:spring-boot-configuration-processor" )
53+
6454 // utilities
6555 implementation(" com.google.guava:guava:$guavaVersion " )
66- implementation(" io.hypersistence:hypersistence-utils-hibernate-63:$hypersistenceUtilsVersion " )
6756 implementation(" io.github.oshai:kotlin-logging-jvm:$kotlinLoggingJvmVersion " )
68-
69- // dev tools
70- developmentOnly(" org.springframework.boot:spring-boot-devtools" )
71- annotationProcessor(" org.springframework.boot:spring-boot-configuration-processor" )
57+ implementation(" io.hypersistence:hypersistence-utils-hibernate-71:$hypersistenceUtilsVersion " )
7258
7359 // kotlin
7460 implementation(" org.jetbrains.kotlin:kotlin-reflect" )
75- implementation(" org.jetbrains.kotlin:kotlin-stdlib-jdk8" )
76-
77- // jackson
78- implementation(" com.fasterxml.jackson.module:jackson-module-kotlin" )
79- implementation(" com.fasterxml.jackson.module:jackson-module-parameter-names" )
61+ implementation(" tools.jackson.module:jackson-module-kotlin" )
8062
8163 // database
8264 runtimeOnly(" org.postgresql:postgresql" )
83- implementation(" org.liquibase:liquibase-core" )
8465
8566 // testing
86- testImplementation(" org.springframework.security:spring-security-test" )
8767 testImplementation(" org.springframework.boot:spring-boot-testcontainers" )
88- testImplementation(" org.springframework.boot:spring-boot-starter-test" ) {
89- exclude(" org.mockito" , " mockito-core" )
90- exclude(" org.junit.vintage" , " junit-vintage-engine" )
91- }
68+ testImplementation(" org.springframework.boot:spring-boot-starter-data-jpa-test" )
69+ testImplementation(" org.springframework.boot:spring-boot-starter-liquibase-test" )
70+ testImplementation(" org.springframework.boot:spring-boot-starter-validation-test" )
71+ testImplementation(" org.springframework.boot:spring-boot-starter-webmvc-test" )
72+ testImplementation(" org.springframework.boot:spring-boot-starter-security-test" )
9273
9374 testImplementation(" org.assertj:assertj-core:$assertJVersion " )
9475
@@ -103,8 +84,8 @@ dependencies {
10384 testImplementation(" com.icegreen:greenmail-junit5:$greenMailVersion " )
10485
10586 // testcontainers
106- testImplementation(" org.testcontainers:junit-jupiter" )
107- testImplementation(" org.testcontainers:postgresql" )
87+ testImplementation(" org.testcontainers:testcontainers- junit-jupiter" )
88+ testImplementation(" org.testcontainers:testcontainers- postgresql" )
10889}
10990
11091dependencyManagement {
@@ -113,6 +94,12 @@ dependencyManagement {
11394 }
11495}
11596
97+ allOpen {
98+ annotation(" jakarta.persistence.Entity" )
99+ annotation(" jakarta.persistence.MappedSuperclass" )
100+ annotation(" jakarta.persistence.Embeddable" )
101+ }
102+
116103tasks {
117104 test {
118105 useJUnitPlatform()
@@ -142,7 +129,7 @@ tasks {
142129 }
143130
144131 bootBuildImage {
145- environment.put(" BP_JVM_VERSION" , " 21 " )
132+ environment.put(" BP_JVM_VERSION" , JVM_25 .target )
146133 environment.put(" BPE_DELIM_JAVA_TOOL_OPTIONS" , " " )
147134 environment.put(
148135 " BPE_APPEND_JAVA_TOOL_OPTIONS" ,
@@ -152,16 +139,25 @@ tasks {
152139 }
153140}
154141
155- tasks.withType< KotlinCompile > {
142+ kotlin {
156143 compilerOptions {
157- jvmTarget.set(JVM_21 )
158- languageVersion.set(KOTLIN_2_0 )
159- freeCompilerArgs.set(
160- listOf (
161- " -Xjsr305=strict" ,
162- " -Xjdk-release=${java.sourceCompatibility} "
163- )
164- )
144+ jvmTarget.set(JVM_25 )
145+ languageVersion.set(KOTLIN_2_3 )
146+ freeCompilerArgs.addAll(" -Xjsr305=strict" , " -Xjdk-release=${java.sourceCompatibility} " )
147+ }
148+ }
149+
150+ springBoot {
151+ buildInfo {
152+ properties {
153+ group.set(project.group as String )
154+ version.set(project.version as String )
155+ artifact.set(project.name)
156+
157+ description = " webBudget backend application"
158+
159+ name.set(" webBudget Backend" )
160+ }
165161 }
166162}
167163
0 commit comments