Skip to content

Commit

Permalink
Upgrade gradle wrapper to 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
MikAoJk committed Sep 4, 2023
1 parent 08fa55a commit 577c1b6
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM gcr.io/distroless/java17-debian11@sha256:052076466984fd56979c15a9c3b7433262b0ad9aae55bc0c53d1da8ffdd829c3
WORKDIR /app
COPY build/libs/*-all.jar app.jar
COPY build/libs/app-*.jar app.jar
ENV JAVA_OPTS="-Dlogback.configurationFile=logback.xml"
ENV TZ="Europe/Oslo"
EXPOSE 8080
Expand Down
54 changes: 26 additions & 28 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer

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

Expand All @@ -23,7 +20,7 @@ val jaxwsToolsVersion = "2.3.2"
val jaxbRuntimeVersion = "2.4.0-b180830.0438"
val javaTimeAdapterVersion = "1.1.3"
val mockkVersion = "1.13.7"
val kotlinVersion = "1.9.0"
val kotlinVersion = "1.9.10"
val googleCloudStorageVersion = "2.26.1"
val junitJupiterVersion = "5.10.0"
val flywayVersion = "9.21.1"
Expand All @@ -33,21 +30,21 @@ val embeddedPostgresVersion = "2.0.4"
val commonsCodecVersion = "1.16.0"
val ktfmtVersion = "0.44"

application {
mainClass.set("no.nav.syfo.ApplicationKt")

val isDevelopment: Boolean = project.ext.has("development")
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
}

plugins {
kotlin("jvm") version "1.9.0"
id("io.ktor.plugin") version "2.3.3"
id("application")
kotlin("jvm") version "1.9.10"
id("com.diffplug.spotless") version "6.20.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.cyclonedx.bom") version "1.7.4"
}

application {
mainClass.set("no.nav.syfo.ApplicationKt")

val isDevelopment: Boolean = project.ext.has("development")
applicationDefaultJvmArgs = listOf("-Dio.ktor.development=$isDevelopment")
}

val githubUser: String by project
val githubPassword: String by project
Expand Down Expand Up @@ -115,9 +112,9 @@ dependencies {
implementation("com.zaxxer:HikariCP:$hikariVersion")
implementation("org.flywaydb:flyway-core:$flywayVersion")

testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
testImplementation("org.junit.jupiter:junit-jupiter:$junitJupiterVersion")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")

testImplementation("io.mockk:mockk:$mockkVersion")
testImplementation("io.ktor:ktor-server-test-host:$ktorVersion") {
exclude(group = "org.eclipse.jetty")
Expand All @@ -127,24 +124,22 @@ dependencies {


tasks {
withType<Jar> {
manifest.attributes["Main-Class"] = "no.nav.syfo.ApplicationKt"
}
create("printVersion") {

doLast {
println(project.version)
shadowJar {
archiveBaseName.set("app")
archiveClassifier.set("")
isZip64 = true
manifest {
attributes(
mapOf(
"Main-Class" to "no.nav.syfo.ApplicationKt",
),
)
}
}

withType<ShadowJar> {
transform(ServiceFileTransformer::class.java) {
setPath("META-INF/cxf")
include("bus-extensions.txt")
}
}

withType<Test> {
test {
useJUnitPlatform {}
testLogging {
events("skipped", "failed")
Expand All @@ -153,10 +148,13 @@ tasks {
}
}


spotless {
kotlin { ktfmt(ktfmtVersion).kotlinlangStyle() }
check {
dependsOn("spotlessApply")
}
}


}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 4 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down

0 comments on commit 577c1b6

Please sign in to comment.