diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a39eeabd..4eea30a4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 2c502624..894414d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" diff --git a/README.md b/README.md index 850c0beb..31b01a93 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/build.gradle.kts b/build.gradle.kts index 236d2b1c..fd9b46f0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + group = "no.nav.syfo" version = "1.0.0" @@ -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") @@ -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") @@ -131,6 +140,13 @@ dependencies { } +kotlin { + compilerOptions { + jvmTarget = javaVersion + } +} + + tasks { shadowJar { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3fa8f862..a4413138 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/gradlew b/gradlew index 0adc8e1a..1aa94a42 100755 --- a/gradlew +++ b/gradlew @@ -145,7 +145,7 @@ 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 @@ -153,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | 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 @@ -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" \