@@ -5,8 +5,6 @@ plugins {
55 id(" com.github.johnrengelman.shadow" ) version " 8.1.1"
66 id(" com.github.ben-manes.versions" ) version " 0.52.0"
77 id(" org.springframework.boot" ) version " 3.5.6"
8- // id("org.springframework.boot") version "3.5.8"
9- // id("org.springframework.boot") version "4.0.0"
108 id(" org.springdoc.openapi-gradle-plugin" ) version " 1.9.0"
119 id(" io.spring.dependency-management" ) version " 1.1.7"
1210 id(" org.sonarqube" ) version " 7.0.1.6134"
@@ -30,55 +28,62 @@ java {
3028
3129repositories {
3230 mavenCentral()
33- // maven { url = uri("https://repo.spring.io/milestone") }
34- // maven { url = uri("https://repo.spring.io/snapshot") }
3531}
3632
33+ val datafakerVer = " 2.5.3"
34+ val lombokVer = " 1.18.38"
35+ val webMVCuiVer = " 2.8.13"
36+ val jacksonNullableVer = " 0.2.6"
37+ val mapstructVer = " 1.5.5.Final"
38+ val HikariCPVer = " 6.3.0"
39+ val postgresqlVer = " 42.7.7"
40+ val lmMapstructBndVer = " 0.2.0"
41+ val assertjVer = " 4.1.1"
42+ val instancioVer = " 5.5.1"
43+
3744dependencies {
3845 implementation(" org.springframework.boot:spring-boot-starter" )
39- // implementation("org.springframework.boot:spring-boot-starter:4.0.0")
4046 implementation(" org.springframework.boot:spring-boot-starter-web" )
4147 implementation(" org.springframework.boot:spring-boot-starter-data-jpa" )
4248 implementation(" org.springframework.boot:spring-boot-starter-validation" )
4349 implementation(" org.springframework.boot:spring-boot-starter-security" )
4450 implementation(" org.springframework.boot:spring-boot-starter-oauth2-resource-server" )
4551 implementation(" org.springframework.boot:spring-boot-devtools" )
4652 //
47- implementation(" net.datafaker:datafaker:2.5.3 " )
48- // SpringDoc OpenAPI Starter WebMVC UI » 2.8.13
49- implementation(" org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.13 " )
53+ implementation(" net.datafaker:datafaker:$datafakerVer " )
54+ // SpringDoc OpenAPI Starter WebMVC UI
55+ implementation(" org.springdoc:springdoc-openapi-starter-webmvc-ui:$webMVCuiVer " )
5056 // модуль jackson-databind-nullable
51- implementation(" org.openapitools:jackson-databind-nullable:0.2.6 " )
57+ implementation(" org.openapitools:jackson-databind-nullable:$jacksonNullableVer " )
5258 // Mapstruct
53- implementation(" org.mapstruct:mapstruct:1.5.5.Final" )
59+ implementation(" org.mapstruct:mapstruct:$mapstructVer " )
60+ // DataBase section
61+ implementation(" com.zaxxer:HikariCP:$HikariCPVer " )
62+ runtimeOnly(" com.h2database:h2" ) // database H2 & HikariCP
63+ implementation(" org.postgresql:postgresql:$postgresqlVer " )
64+
5465 // конфиг Mapstruct не работает с классами, в которых используется lombok
5566 // https://ru.stackoverflow.com/questions/1286369
56- compileOnly(" org.projectlombok:lombok:1.18.38" )
57- compileOnly(" org.mapstruct:mapstruct:1.5.5.Final" )
58- annotationProcessor(" org.projectlombok:lombok-mapstruct-binding:0.2.0" )
59- annotationProcessor(" org.mapstruct:mapstruct-processor:1.5.5.Final" )
60- annotationProcessor(" org.projectlombok:lombok:1.18.38" )
61- // DataBase section
62- implementation(" com.zaxxer:HikariCP:6.3.0" )
63- runtimeOnly(" com.h2database:h2" )
64- implementation(" com.h2database:h2:" ) // database H2 & HikariCP
65- // for driver class: org.postgresql.Driver
66- runtimeOnly(" org.postgresql:postgresql" )
67- implementation(" org.postgresql:postgresql:42.7.7" )
67+ compileOnly(" org.projectlombok:lombok:$lombokVer " )
68+ compileOnly(" org.mapstruct:mapstruct:$mapstructVer " )
69+ annotationProcessor(" org.projectlombok:lombok-mapstruct-binding:$lmMapstructBndVer " )
70+ annotationProcessor(" org.mapstruct:mapstruct-processor:$mapstructVer " )
71+ annotationProcessor(" org.projectlombok:lombok:$lombokVer " )
72+
6873 // *** Tests ***
69- testCompileOnly(" org.projectlombok:lombok:1.18.38 " )
70- testAnnotationProcessor(" org.projectlombok:lombok:1.18.38 " )
71- testAnnotationProcessor(" org.mapstruct:mapstruct-processor:1.5.5.Final " )
74+ testCompileOnly(" org.projectlombok:lombok:$lombokVer " )
75+ testAnnotationProcessor(" org.projectlombok:lombok:$lombokVer " )
76+ testAnnotationProcessor(" org.mapstruct:mapstruct-processor:$mapstructVer " )
7277 //
7378 testRuntimeOnly(" org.junit.platform:junit-platform-launcher" )
7479 // стартёр тестов
7580 testImplementation(" org.springframework.boot:spring-boot-starter-test" )
7681 // для аутентификации
7782 testImplementation(" org.springframework.security:spring-security-test" )
7883 // test JSON struct
79- testImplementation(" net.javacrumbs.json-unit:json-unit-assertj:4.1.1 " )
84+ testImplementation(" net.javacrumbs.json-unit:json-unit-assertj:$assertjVer " )
8085 // Instacio
81- testImplementation(" org.instancio:instancio-junit:5.5.1 " )
86+ testImplementation(" org.instancio:instancio-junit:$instancioVer " )
8287}
8388
8489checkstyle {
0 commit comments