From 358417ca01919e6e7f27322abb4d070b2a584e5e Mon Sep 17 00:00:00 2001 From: Stefan Boos Date: Wed, 6 Mar 2024 05:52:46 +0100 Subject: [PATCH] build(deps): bump java from 17 to 21, gradle-wrapper from 7.4.1 to 8.6, spring-boot from 2.7.4 to 3.2.3 --- .sdkmanrc | 4 ++-- README.md | 6 +++--- build.gradle | 7 +++++-- gradle/wrapper/gradle-wrapper.properties | 2 +- .../systems/boos/traindelays/TrainDelaysController.java | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.sdkmanrc b/.sdkmanrc index 033da8f..332ab4c 100644 --- a/.sdkmanrc +++ b/.sdkmanrc @@ -1,4 +1,4 @@ # Enable auto-env through the sdkman_auto_env config # Add key=value pairs of SDKs to use below -java=17.0.4-tem -gradle=7.6.3 +java=21.0.2-tem +gradle=8.6 diff --git a/README.md b/README.md index 15efb4c..7a6de5a 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,13 @@ an [Open Source License](https://www.jetbrains.com/community/opensource/) for th The build is tested with the following versions: -- [Java 17.0.4](https://adoptopenjdk.net/) -- [Gradle 7.6.3](https://gradle.org/) +- [Java 21.0.2](https://adoptopenjdk.net/) +- [Gradle](https://gradle.org/) is configured by the [gradle-wrapper.properties](gradle/wrapper/gradle-wrapper.properties) ### Build the Solution and Run the Tests ```sh -./gradlew clean build test +./gradlew clean build test --warning-mode all ``` ## Before Creating a Pull Request diff --git a/build.gradle b/build.gradle index d7e7ae4..19a3be7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'org.springframework.boot' version '2.7.4' + id 'org.springframework.boot' version '3.2.3' id 'io.spring.dependency-management' version '1.1.0' id 'java' id 'jacoco' @@ -8,7 +8,10 @@ plugins { group = 'systems.boos' version = '0.0.1-SNAPSHOT' -sourceCompatibility = '17' + +java { + sourceCompatibility = JavaVersion.VERSION_21 +} repositories { mavenCentral() diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 00e33ed..17655d0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/systems/boos/traindelays/TrainDelaysController.java b/src/main/java/systems/boos/traindelays/TrainDelaysController.java index 0092c3c..16bb53a 100644 --- a/src/main/java/systems/boos/traindelays/TrainDelaysController.java +++ b/src/main/java/systems/boos/traindelays/TrainDelaysController.java @@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.RestController; import systems.boos.traindelays.model.Timetable; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.time.Instant; import java.time.ZoneOffset; import java.util.Optional;