Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
with:
languages: kotlin

- name: Set up Java 21
- name: Set up Java 25
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
java-version: '25'
architecture: x64

- name: Build gradle artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Java 21
- name: Set up Java 25
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
java-version: '25'
architecture: x64
cache: 'gradle'
- name: Build gradle artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Java 21
- name: Set up Java 25
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
java-version: '25'
architecture: x64
cache: 'gradle'
- name: Run tests
Expand Down
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/java21-debian12@sha256:320d27b74347b6baaf35bcbe21bae51f738b07ed2c0741ead5cf050a3b5c3487
FROM gcr.io/distroless/java25-debian13@sha256:0ea0c4491a57effa3c49c669564b3642d591ed52a3928f22b4cf829bd2736a57

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Repository for `pdfgen`, an application written in Kotlin used to create PDFs an
* Junit
* Handlebars
* VeraPDF-validation
* JDK 21
* JDK 25
* Docker
* [pdfgen-core](https://github.com/navikt/pdfgen-core)

Expand Down
12 changes: 9 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
group = "no.nav.pdfgen"
version = "2.0.0" //This will never change. See GitHub releases for docker image release

val javaVersion = JvmTarget.JVM_21
val javaVersion = JvmTarget.JVM_25


val handlebarsVersion = "4.3.1"
Expand All @@ -18,15 +18,16 @@ val junitJupiterVersion = "6.0.2"
val verapdfVersion = "1.28.2"
val ktfmtVersion = "0.44"
val testcontainersVersion = "2.0.3"
val pdfgencoreVersion = "1.1.68"
val pdfgencoreVersion = "1.1.69"

///Due to vulnerabilities
val commonsCompressVersion = "1.28.0"
val commonsIoVersion = "2.21.0"
val rhinoVersion = "1.7.14.1"

plugins {
id("application")
kotlin("jvm") version "2.2.21"
kotlin("jvm") version "2.3.0"
id("com.diffplug.spotless") version "8.1.0"
id("com.github.ben-manes.versions") version "0.53.0"
}
Expand Down Expand Up @@ -106,6 +107,11 @@ dependencies {
implementation("io.prometheus:simpleclient_hotspot:$prometheusVersion")

implementation("org.verapdf:validation-model:$verapdfVersion")
constraints {
implementation("org.mozilla:rhino:$rhinoVersion") {
because("Due to vulnerabilities in org.verapdf:validation-model")
}
}

implementation("ch.qos.logback:logback-classic:$logbackVersion")
implementation("net.logstash.logback:logstash-logback-encoder:$logstashEncoderVersion")
Expand Down
4 changes: 2 additions & 2 deletions src/test/kotlin/no/nav/pdfgen/ApplicationTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ internal class ApplicationTest {
@Test
internal fun `App is ready only after ServerReady is raised`() {
testApplication {
lateinit var raiseApplicationStarted: () -> Any
lateinit var raiseServerReady: () -> Any
lateinit var raiseApplicationStarted: () -> Any
lateinit var raiseServerReady: () -> Any
application {
routing {
val applicationState = ApplicationState()
Expand Down
3 changes: 1 addition & 2 deletions src/test/kotlin/no/nav/pdfgen/DockerImageTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ internal class DockerImageTest {
val network = Network.newNetwork()

val pdfgenContainer =
GenericContainer(ImageFromDockerfile()
.withDockerfile(Path("./Dockerfile")))
GenericContainer(ImageFromDockerfile().withDockerfile(Path("./Dockerfile")))
.withNetwork(network)
.withCopyToContainer(MountableFile.forHostPath("templates"), "/app/templates")
.withCopyToContainer(MountableFile.forHostPath("fonts"), "/app/fonts")
Expand Down
5 changes: 4 additions & 1 deletion src/test/kotlin/no/nav/pdfgen/PdfGenITest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ internal class PdfGenITest {
}
}
assertEquals(true, response.status.isSuccess())
assertEquals(true, response.headers["Content-Type"]!!.contains("application/pdf"))
assertEquals(
true,
response.headers["Content-Type"]!!.contains("application/pdf")
)
val bytes = runBlocking { response.readRawBytes() }
assertNotEquals(null, bytes)
// Load the document in pdfbox to ensure it's valid
Expand Down
Loading