Skip to content

Commit

Permalink
Bruk org.jlleitschuh.gradle.ktlint plugin over spotless.
Browse files Browse the repository at this point in the history
  • Loading branch information
geiralund committed Jun 25, 2024
1 parent d85fdcc commit 0b0e1a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
`kotlin-dsl`
id("com.diffplug.spotless") version "6.25.0"
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
}

repositories {
Expand All @@ -10,5 +10,5 @@ repositories {

dependencies {
implementation(kotlin("gradle-plugin"))
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.25.0")
implementation("org.jlleitschuh.gradle:ktlint-gradle:12.1.0")
}
15 changes: 3 additions & 12 deletions buildSrc/src/main/kotlin/common.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm")
id("com.diffplug.spotless")
id("org.jlleitschuh.gradle.ktlint")
}

repositories {
mavenCentral()
maven {
url = uri("https://github-package-registry-mirror.gc.nav.no/cached/maven-release")
}
maven("https://jitpack.io")
}

dependencies {
Expand All @@ -34,16 +35,6 @@ tasks.test {
}
}

configure<com.diffplug.gradle.spotless.SpotlessExtension> {
kotlin {
ktlint()
}

kotlinGradle {
ktlint()
}
}

tasks.withType<KotlinCompile>().configureEach {
dependsOn("spotlessApply")
dependsOn("ktlintFormat")
}

0 comments on commit 0b0e1a5

Please sign in to comment.