Skip to content

Commit

Permalink
Server: upgrade to Java 21
Browse files Browse the repository at this point in the history
Major features can be found here: https://advancedweb.hu/a-categorized-list-of-all-java-and-jvm-features-since-jdk-8-to-21/

Required companion upgrades:
  - Gradle 8.0.2 -> 8.4, see https://docs.gradle.org/8.4/userguide/upgrading_version_8.html for changes
  - Lombok 1.18.24 -> 1.18.30, see projectlombok/lombok#3393
  - Spring Boot 3.0.1 -> 3.1.4 to support new version of Lombok, see https://stackoverflow.com/a/77171271
  • Loading branch information
StenAL committed Oct 21, 2023
1 parent d36b799 commit b8972c2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/server-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- name: checkout current repository
uses: actions/checkout@v3

- name: set up Java 17
- name: set up Java 21
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: build application jar
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Deployment is automated using GitHub Actions and AWS. The deployed backend is
containerized using Docker.

## Development
To locally run this you need [Java 17](https://adoptium.net/),
To locally run this you need [Java](https://adoptium.net/),
[NodeJS](https://nodejs.org/en/),
[Docker + Docker Compose](https://docs.docker.com/get-docker/) or [MariaDB](https://mariadb.org/download/),
[Gradle](https://gradle.org/install/) (optional).
Expand Down
6 changes: 3 additions & 3 deletions server/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
plugins {
id 'org.springframework.boot' version '3.0.1'
id 'org.springframework.boot' version '3.1.4'
id 'io.spring.dependency-management' version '1.1.0'
id "com.gorylenko.gradle-git-properties" version "2.4.1" // Used by Sentry to match errors to specific git commit
id "io.freefair.lombok" version "6.6.1"
id "io.freefair.lombok" version "8.4" // Lombok 1.18.30
id 'java'
}

group = 'xyz.laane'
version = '1.0.0'

java {
sourceCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
}

repositories {
Expand Down
4 changes: 2 additions & 2 deletions server/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM eclipse-temurin:17
FROM eclipse-temurin:21
COPY build/libs/*.jar app.jar
ENTRYPOINT ["java", "-jar", "/app.jar", "--spring.profiles.active=prod"]
ENTRYPOINT ["java", "-jar", "/app.jar", "--spring.profiles.active=prod"]
2 changes: 1 addition & 1 deletion server/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit b8972c2

Please sign in to comment.