Skip to content

Commit

Permalink
chore: bumped to jdk21 (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikAoJk authored Jun 13, 2024
1 parent 62cfac5 commit 3bb5d2d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
jar-app:
uses: navikt/teamsykmelding-github-actions-workflows/.github/workflows/jar-app.yaml@main
uses: navikt/teamsykmelding-github-actions-workflows/.github/workflows/jar-app-21.yaml@main
secrets: inherit
with:
app: syfosmpapirmottak
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM gcr.io/distroless/java17-debian11@sha256:d1ebe3d183e2e6bd09d4fd8f2cf0206693a3bca1858afe393ceb3161b5268f40
FROM gcr.io/distroless/java21-debian12@sha256:4c79ab242b99bf7ce29f97be45c0c360e3ecd564475becdfcdcc01a3196777ac
WORKDIR /app
COPY build/libs/app-*.jar app.jar
ENV JAVA_OPTS="-Dlogback.configurationFile=logback.xml"
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ This project contains the receiving a paper sykmelding2013 message
* Kotest
* Jackson

#### Requirements

* JDK 17
### Prerequisites
Make sure you have the Java JDK 21 installed
You can check which version you have installed using this command:
``` bash
java -version
```

## FlowChart
This the high level flow of the application
Expand Down
16 changes: 16 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

group = "no.nav.syfo"
version = "1.0.0"

Expand Down Expand Up @@ -31,6 +33,8 @@ val ktfmtVersion = "0.44"
val snappyJavaVersion = "1.1.10.5"
val avroVersion = "1.11.3"
val diagnosekoderVersion = "1.2024.0"
val javaVersion = JvmTarget.JVM_21
val commonsCompressVersion = "1.26.2"

plugins {
id("application")
Expand Down Expand Up @@ -84,6 +88,11 @@ dependencies {
because("override transient from io.confluent:kafka-avro-serializer")
}
}
constraints {
implementation("org.apache.commons:commons-compress:$commonsCompressVersion") {
because("override transient from io.confluent:kafka-avro-serializer")
}
}
implementation("no.nav.teamdokumenthandtering:teamdokumenthandtering-avro-schemas:$joarkHendelseVersion")

implementation("no.nav.helse.xml:xmlfellesformat:$syfoXmlCodegenVersion")
Expand Down Expand Up @@ -131,6 +140,13 @@ dependencies {
}


kotlin {
compilerOptions {
jvmTarget = javaVersion
}
}


tasks {

shadowJar {
Expand Down
2 changes: 1 addition & 1 deletion 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.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 7 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -202,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down

0 comments on commit 3bb5d2d

Please sign in to comment.