File tree Expand file tree Collapse file tree 3 files changed +15
-17
lines changed Expand file tree Collapse file tree 3 files changed +15
-17
lines changed Original file line number Diff line number Diff line change 1
1
plugins {
2
2
`kotlin- dsl`
3
- id(" com.diffplug.spotless " ) version " 6.25 .0"
3
+ id(" org.jlleitschuh.gradle.ktlint " ) version " 12.2 .0"
4
4
}
5
5
6
6
repositories {
@@ -10,5 +10,5 @@ repositories {
10
10
11
11
dependencies {
12
12
implementation(kotlin(" gradle-plugin" ))
13
- implementation(" com.diffplug.spotless:spotless-plugin- gradle:6.25.0 " )
13
+ implementation(" org.jlleitschuh.gradle:ktlint- gradle:12.1.2 " )
14
14
}
Original file line number Diff line number Diff line change 1
1
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
2
- import org.gradle.api.tasks.testing.logging.TestLogEvent
3
2
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3
+ import org.gradle.api.tasks.testing.logging.TestLogEvent
4
4
5
5
plugins {
6
6
kotlin(" jvm" )
7
- id(" com.diffplug.spotless " )
7
+ id(" org.jlleitschuh.gradle.ktlint " )
8
8
}
9
9
10
10
repositories {
11
11
mavenCentral()
12
- maven(" https://www.jitpack.io" )
12
+ maven(" https://github-package-registry-mirror.gc.nav.no/cached/maven-release" )
13
+ maven(" https://jitpack.io" )
13
14
}
14
15
15
16
dependencies {
17
+ implementation(platform(kotlin(" bom" )))
18
+ implementation(kotlin(" stdlib-jdk8" ))
16
19
testImplementation(kotlin(" test" ))
17
20
}
18
21
@@ -30,17 +33,6 @@ tasks.test {
30
33
}
31
34
}
32
35
33
- configure< com.diffplug.gradle.spotless.SpotlessExtension > {
34
- kotlin {
35
- ktlint()
36
- targetExclude(" build/generated/**" )
37
- }
38
-
39
- kotlinGradle {
40
- ktlint()
41
- }
42
- }
43
-
44
36
tasks.withType<KotlinCompile >().configureEach {
45
- dependsOn(" spotlessApply " )
37
+ dependsOn(" ktlintFormat " )
46
38
}
Original file line number Diff line number Diff line change @@ -109,6 +109,12 @@ tasks.named("graphqlGenerateClient") {
109
109
dependsOn(" downloadPdlSDL" )
110
110
}
111
111
112
+ ktlint {
113
+ filter {
114
+ exclude { element -> element.file.path.contains(" generated/" ) }
115
+ }
116
+ }
117
+
112
118
val Project .buildDir_: File get() = layout.buildDirectory.get().asFile
113
119
val schema = " schema.graphql"
114
120
You can’t perform that action at this time.
0 commit comments