Skip to content

Commit

Permalink
Remove shadow
Browse files Browse the repository at this point in the history
Add detekt
Remove ktlint
  • Loading branch information
kaja-nav committed Jun 19, 2024
1 parent ea202d1 commit 8849c4d
Show file tree
Hide file tree
Showing 3 changed files with 409 additions and 21 deletions.
36 changes: 15 additions & 21 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.PropertiesFileTransformer

group = "no.nav.syfo"

val apacheHttpClientVersion = "5.3.1"
Expand All @@ -22,15 +19,16 @@ val jakartaRsApiVersion = "3.1.0"
val hikari = "5.1.0"
val postgres = "42.7.3"
val postgresEmbedded = "1.0.0"
val detektVersion = "1.23.6"

plugins {
id("java")
kotlin("jvm") version "1.9.24"
kotlin("jvm") version "1.9.23"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("org.jetbrains.kotlin.plugin.allopen") version "1.9.24"
id("org.jetbrains.kotlin.plugin.allopen") version "1.9.23"
id("org.springframework.boot") version "3.3.0"
id("io.spring.dependency-management") version "1.1.5"
id("org.jlleitschuh.gradle.ktlint") version "10.0.0"
id("io.gitlab.arturbosch.detekt") version "1.23.6"
}

allOpen {
Expand Down Expand Up @@ -122,6 +120,8 @@ dependencies {
}
}
}

detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:$detektVersion")
}

java.toolchain {
Expand All @@ -131,24 +131,18 @@ java.toolchain {
tasks {
extra["log4j2.version"] = "2.16.0"

withType<ShadowJar> {
manifest.attributes["Main-Class"] = "no.nav.syfo.ApplicationKt"
transform(PropertiesFileTransformer::class.java) {
paths = listOf("META-INF/spring.factories")
mergeStrategy = "append"
isZip64 = true
}
configureEach {
append("META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports")
append("META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports")
}
mergeServiceFiles()
archiveBaseName.set("app")
archiveClassifier.set("")
archiveVersion.set("")
named<org.springframework.boot.gradle.tasks.bundling.BootJar>("bootJar") {
this.archiveFileName.set("app.jar")
}

withType<Test> {
useJUnitPlatform()
}
}

detekt {
config.from("detekt-config.yml")
buildUponDefaultConfig = true
baseline = file("detekt-baseline.xml")
}

Loading

0 comments on commit 8849c4d

Please sign in to comment.