Skip to content

Commit

Permalink
Made ready for gradle 9 (#130)
Browse files Browse the repository at this point in the history
* Bumped gradle wrapper to 8.3

* Made ready for gradle 9
  • Loading branch information
MikAoJk authored Sep 29, 2023
1 parent 1e75acd commit 2074663
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM gcr.io/distroless/java17@sha256:5cc4322dea54a6732cd2d3feebb18138f62af280a16

WORKDIR /app

COPY build/libs/pdfgen-2.0.0-all.jar app.jar
COPY build/libs/app-*.jar app.jar
COPY fonts fonts
COPY templates templates
COPY resources resources
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ COPY fonts /app/fonts # fonts to be embedded
COPY resources /app/resources # additional resources
```

Check Github releases to find the latest `release` version
Check GitHub releases to find the latest `release` version
Check [Github releases](https://github.com/navikt/pdfgen/releases) to find the latest `release` version

Set up the basic folder structure
Expand Down
32 changes: 21 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

group = "no.nav.pdfgen"
version = "2.0.0" //This will never change. See GitHub releases for docker image release

Expand All @@ -20,30 +18,42 @@ val ktfmtVersion = "0.44"


plugins {
id("application")
kotlin("jvm") version "1.9.10"
id("com.diffplug.spotless") version "6.22.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.github.ben-manes.versions") version "0.48.0"
}

application {
mainClass.set("no.nav.pdfgen.BootstrapKt")
}

tasks {
create("printVersion") {
doLast {
println(project.version)
}
}
withType<Test> {

test {
useJUnitPlatform {}
testLogging {
events("passed", "skipped", "failed")
showStandardStreams = true
}
}
withType<KotlinCompile> {

compileKotlin{
kotlinOptions.jvmTarget = "17"
}
withType<Jar> {
manifest.attributes("Main-Class" to "no.nav.pdfgen.BootstrapKt")

shadowJar {
archiveBaseName.set("app")
archiveClassifier.set("")
isZip64 = true
manifest {
attributes(
mapOf(
"Main-Class" to "no.nav.pdfgen.BootstrapKt",
),
)
}
}

spotless {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,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=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=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down

0 comments on commit 2074663

Please sign in to comment.