Skip to content

Commit 2b5aa61

Browse files
committed
update deps
Signed-off-by: Kirill Mokevnin <[email protected]>
1 parent ed062bd commit 2b5aa61

File tree

9 files changed

+172
-50
lines changed

9 files changed

+172
-50
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
setup:
22
npm install
3-
./gradlew wrapper --gradle-version 8.14
3+
./gradlew wrapper --gradle-version 8.14.1
44
./gradlew build
55

66
frontend:
@@ -42,8 +42,8 @@ test:
4242
update-js-deps:
4343
cd frontend && npx ncu -u
4444

45-
check-java-deps:
46-
./gradlew dependencyUpdates -Drevision=release
45+
update-deps:
46+
./gradlew refreshVersions
4747

4848
# generate-migrations:
4949
# gradle diffChangeLog

build.gradle.kts

Lines changed: 73 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,98 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
33

44
plugins {
55
application
6-
// "checkstyle"
7-
id("io.freefair.lombok") version "8.11"
8-
id("org.springframework.boot") version "3.3.5"
9-
id("io.spring.dependency-management") version "1.1.6"
10-
id("com.github.ben-manes.versions") version "0.51.0"
6+
jacoco
7+
checkstyle
8+
alias(libs.plugins.lombok)
9+
alias(libs.plugins.versions)
10+
alias(libs.plugins.spotless)
11+
alias(libs.plugins.spring.boot)
12+
alias(libs.plugins.spring.dependency.management)
13+
alias(libs.plugins.shadow)
14+
alias(libs.plugins.sonarqube)
1115
}
1216

1317
group = "io.hexlet.blog"
1418
version = "1.0-SNAPSHOT"
1519

16-
application { mainClass.set("io.hexlet.blog.Application") }
20+
application {
21+
mainClass.set("io.hexlet.blog.Application")
22+
}
1723

18-
repositories { mavenCentral() }
24+
repositories {
25+
mavenCentral()
26+
}
1927

2028
dependencies {
21-
implementation("org.springframework.boot:spring-boot-starter-web")
22-
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
23-
implementation("org.springframework.boot:spring-boot-starter-validation")
24-
implementation("org.springframework.boot:spring-boot-devtools")
25-
implementation("org.springframework.boot:spring-boot-starter-actuator")
26-
implementation("org.springframework.boot:spring-boot-configuration-processor")
27-
implementation("org.springframework.boot:spring-boot-starter-security")
28-
implementation("org.springframework.boot:spring-boot-starter-oauth2-resource-server")
29+
// Spring Boot
30+
implementation(libs.springBootStarterWeb)
31+
implementation(libs.springBootStarterDataJpa)
32+
implementation(libs.springBootStarterValidation)
33+
implementation(libs.springBootStarterActuator)
34+
implementation(libs.springBootStarterSecurity)
35+
implementation(libs.springBootStarterOauth2ResourceServer)
36+
implementation(libs.springBootDevtools)
37+
implementation(libs.springBootConfigProcessor)
2938

30-
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0")
39+
// OpenAPI
40+
implementation(libs.springdocOpenapiUi)
3141

32-
implementation("org.openapitools:jackson-databind-nullable:0.2.6")
33-
implementation("org.mapstruct:mapstruct:1.6.3")
34-
annotationProcessor("org.mapstruct:mapstruct-processor:1.6.3")
42+
// Utilities
43+
implementation(libs.jacksonDatabindNullable)
44+
implementation(libs.commonsLang3)
45+
implementation(libs.datafaker)
46+
implementation(libs.instancioJunit)
47+
implementation(libs.jsonunitAssertj)
3548

36-
// implementation("io.github.wimdeblauwe:error-handling-spring-boot-starter:4.2.0")
49+
// MapStruct
50+
implementation(libs.mapstruct)
51+
annotationProcessor(libs.mapstructProcessor)
3752

38-
implementation("org.instancio:instancio-junit:5.0.2")
39-
implementation("net.javacrumbs.json-unit:json-unit-assertj:4.0.0")
40-
implementation("net.datafaker:datafaker:2.4.2")
53+
// DB
54+
runtimeOnly(libs.h2)
4155

42-
runtimeOnly("com.h2database:h2:2.3.232")
43-
testImplementation("org.springframework.security:spring-security-test")
44-
testImplementation("org.springframework.boot:spring-boot-starter-test")
45-
testImplementation(platform("org.junit:junit-bom:5.11.3"))
46-
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
56+
// Tests
57+
testImplementation(libs.springBootStarterTest)
58+
testImplementation(libs.springSecurityTest)
59+
testImplementation(platform(libs.junitBom))
60+
testImplementation(libs.junitJupiter)
61+
testRuntimeOnly(libs.junitPlatformLauncher)
4762
}
4863

49-
// spotless {
50-
// java {
51-
// // Use the default importOrder configuration
52-
// importOrder()
53-
// }
54-
// }
55-
5664
tasks.test {
5765
useJUnitPlatform()
58-
// https://technology.lastminute.com/junit5-kotlin-and-gradle-dsl/
5966
testLogging {
6067
exceptionFormat = TestExceptionFormat.FULL
61-
events = mutableSetOf(TestLogEvent.FAILED, TestLogEvent.PASSED, TestLogEvent.SKIPPED)
62-
// showStackTraces = true
63-
// showCauses = true
68+
events = setOf(
69+
TestLogEvent.FAILED,
70+
TestLogEvent.PASSED,
71+
TestLogEvent.SKIPPED
72+
)
6473
showStandardStreams = true
6574
}
6675
}
76+
77+
tasks.jacocoTestReport {
78+
reports {
79+
xml.required.set(true)
80+
}
81+
}
82+
83+
spotless {
84+
java {
85+
importOrder()
86+
removeUnusedImports()
87+
eclipse().sortMembersEnabled(true)
88+
formatAnnotations()
89+
indentWithSpaces(4)
90+
}
91+
}
92+
93+
sonar {
94+
properties {
95+
property("sonar.projectKey", "hexlet-boilerplates_java-package")
96+
property("sonar.organization", "hexlet-boilerplates")
97+
property("sonar.host.url", "https://sonarcloud.io")
98+
}
99+
}
100+

gradle/libs.versions.toml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
## Generated by $ ./gradlew refreshVersionsCatalog
2+
3+
[plugins]
4+
5+
spring-boot = { id = "org.springframework.boot", version.ref = "spring-boot-version" }
6+
spring-dependency-management = { id = "io.spring.dependency-management", version.ref = "spring-dependency-version" }
7+
lombok = { id = "io.freefair.lombok", version.ref = "lombok-plugin" }
8+
versions = { id = "com.github.ben-manes.versions", version.ref = "versions-plugin" }
9+
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow-plugin" }
10+
sonarqube = { id = "org.sonarqube", version.ref = "sonarqube-plugin" }
11+
spotless = { id = "com.diffplug.spotless", version.ref = "spotless-plugin" }
12+
13+
[versions]
14+
15+
spring-boot-version = "3.5.0"
16+
spring-security-test-version = "6.5.0"
17+
spring-dependency-version = "1.1.7"
18+
lombok-plugin = "8.13.1"
19+
versions-plugin = "0.52.0"
20+
shadow-plugin = "8.1.1"
21+
sonarqube-plugin = "6.2.0.5505"
22+
spotless-plugin = "7.0.3"
23+
24+
jackson-databind-nullable = "0.2.6"
25+
springdoc-openapi-ui = "2.8.8"
26+
commons-lang3 = "3.17.0"
27+
datafaker = "2.4.3"
28+
instancio-junit = "5.4.1"
29+
jsonunit-assertj = "4.1.1"
30+
mapstruct = "1.6.3"
31+
h2 = "2.3.232"
32+
junit-bom = "5.12.2"
33+
## ⬆ = "5.13.0-M1"
34+
## ⬆ = "5.13.0-M2"
35+
## ⬆ = "5.13.0-M3"
36+
## ⬆ = "5.13.0-RC1"
37+
38+
[libraries]
39+
40+
# Spring Boot
41+
springBootStarterWeb = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "spring-boot-version" }
42+
springBootStarterDataJpa = { module = "org.springframework.boot:spring-boot-starter-data-jpa", version.ref = "spring-boot-version" }
43+
springBootStarterValidation = { module = "org.springframework.boot:spring-boot-starter-validation", version.ref = "spring-boot-version" }
44+
springBootStarterActuator = { module = "org.springframework.boot:spring-boot-starter-actuator", version.ref = "spring-boot-version" }
45+
springBootStarterSecurity = { module = "org.springframework.boot:spring-boot-starter-security", version.ref = "spring-boot-version" }
46+
springBootStarterOauth2ResourceServer = { module = "org.springframework.boot:spring-boot-starter-oauth2-resource-server", version.ref = "spring-boot-version" }
47+
springBootStarterTest = { module = "org.springframework.boot:spring-boot-starter-test", version.ref = "spring-boot-version" }
48+
springBootDevtools = { module = "org.springframework.boot:spring-boot-devtools", version.ref = "spring-boot-version" }
49+
springBootConfigProcessor = { module = "org.springframework.boot:spring-boot-configuration-processor", version.ref = "spring-boot-version" }
50+
51+
# Spring Security Test
52+
springSecurityTest = { module = "org.springframework.security:spring-security-test", version.ref = "spring-security-test-version" }
53+
54+
# OpenAPI
55+
springdocOpenapiUi = { module = "org.springdoc:springdoc-openapi-starter-webmvc-ui", version.ref = "springdoc-openapi-ui" }
56+
57+
# Jackson
58+
jacksonDatabindNullable = { module = "org.openapitools:jackson-databind-nullable", version.ref = "jackson-databind-nullable" }
59+
60+
# Utilities
61+
commonsLang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commons-lang3" }
62+
datafaker = { module = "net.datafaker:datafaker", version.ref = "datafaker" }
63+
instancioJunit = { module = "org.instancio:instancio-junit", version.ref = "instancio-junit" }
64+
jsonunitAssertj = { module = "net.javacrumbs.json-unit:json-unit-assertj", version.ref = "jsonunit-assertj" }
65+
66+
# MapStruct
67+
mapstruct = { module = "org.mapstruct:mapstruct", version.ref = "mapstruct" }
68+
mapstructProcessor = { module = "org.mapstruct:mapstruct-processor", version.ref = "mapstruct" }
69+
70+
# Database
71+
h2 = { module = "com.h2database:h2", version.ref = "h2" }
72+
73+
# JUnit
74+
junitBom = { module = "org.junit:junit-bom", version.ref = "junit-bom" }
75+
junitJupiter = { module = "org.junit.jupiter:junit-jupiter" }
76+
junitPlatformLauncher = { module = "org.junit.platform:junit-platform-launcher" }

gradle/wrapper/gradle-wrapper.jar

181 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ done
8686
# shellcheck disable=SC2034
8787
APP_BASE_NAME=${0##*/}
8888
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90-
' "$PWD" ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
9190

9291
# Use the maximum available, or set MAX_FD != -1 to use that value.
9392
MAX_FD=maximum
@@ -115,7 +114,7 @@ case "$( uname )" in #(
115114
NONSTOP* ) nonstop=true ;;
116115
esac
117116

118-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
117+
CLASSPATH="\\\"\\\""
119118

120119

121120
# Determine the Java command to use to start the JVM.
@@ -206,15 +205,15 @@ fi
206205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
207206

208207
# Collect all arguments for the java command:
209-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210209
# and any embedded shellness will be escaped.
211210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212211
# treated as '${Hostname}' itself on the command line.
213212

214213
set -- \
215214
"-Dorg.gradle.appname=$APP_BASE_NAME" \
216215
-classpath "$CLASSPATH" \
217-
org.gradle.wrapper.GradleWrapperMain \
216+
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
218217
"$@"
219218

220219
# Stop when "xargs" is not available.

gradlew.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ goto fail
7070
:execute
7171
@rem Setup the command line
7272

73-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73+
set CLASSPATH=
7474

7575

7676
@rem Execute Gradle
77-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
77+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
7878

7979
:end
8080
@rem End local scope for the variables with windows NT shell

settings.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
rootProject.name = "HexletSpringBlog"
22
// spring.jpa.generate-ddl = true
33
// spring.jpa.hibernate.ddl-auto
4+
5+
plugins {
6+
// See https://jmfayard.github.io/refreshVersions
7+
id("de.fayard.refreshVersions") version "0.60.5"
8+
}

versions.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#### Dependencies and Plugin versions with their available updates.
2+
#### Generated by `./gradlew refreshVersions` version 0.60.5
3+
####
4+
#### Don't manually edit or split the comments that start with four hashtags (####),
5+
#### they will be overwritten by refreshVersions.
6+
####
7+
#### suppress inspection "SpellCheckingInspection" for whole file
8+
#### suppress inspection "UnusedProperty" for whole file

0 commit comments

Comments
 (0)