Skip to content

Commit d9ef0a7

Browse files
committed
Dedupe ktlint settings via the newly introduced gradlebuild.ktlint plugin
1 parent a6222c0 commit d9ef0a7

File tree

4 files changed

+26
-16
lines changed

4 files changed

+26
-16
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2021 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
plugins {
18+
id("org.gradle.kotlin-dsl.ktlint-convention")
19+
}
20+
21+
ktlint {
22+
version.set("0.41.0")
23+
}

build-logic-commons/gradle-plugin/src/main/kotlin/gradlebuild.build-logic.kotlin-dsl-gradle-plugin.gradle.kts

+1-6
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ plugins {
2525
id("java-library")
2626
id("org.gradle.kotlin.kotlin-dsl") // this is 'kotlin-dsl' without version
2727
id("gradlebuild.code-quality")
28-
id("org.gradle.kotlin-dsl.ktlint-convention")
29-
}
30-
31-
ktlint {
32-
version.set("0.41.0")
28+
id("gradlebuild.ktlint")
3329
}
3430

3531
java {
@@ -45,7 +41,6 @@ dependencies {
4541
}
4642

4743
ktlint {
48-
version.set("0.41.0")
4944
filter {
5045
exclude("gradle/kotlin/dsl/accessors/_*/**")
5146
}

build-logic/uber-plugins/src/main/kotlin/gradlebuild.internal.kotlin-js.gradle.kts

+1-5
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,8 @@ plugins {
2020
kotlin("js")
2121
id("gradlebuild.dependency-modules")
2222
id("gradlebuild.repositories")
23-
id("org.gradle.kotlin-dsl.ktlint-convention")
2423
id("gradlebuild.code-quality")
25-
}
26-
27-
ktlint {
28-
version.set("0.41.0")
24+
id("gradlebuild.ktlint")
2925
}
3026

3127
kotlin {

build-logic/uber-plugins/src/main/kotlin/gradlebuild.kotlin-library.gradle.kts

+1-5
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2222
plugins {
2323
kotlin("jvm")
2424
id("gradlebuild.java-library")
25-
id("org.gradle.kotlin-dsl.ktlint-convention")
26-
}
27-
28-
ktlint {
29-
version.set("0.41.0")
25+
id("gradlebuild.ktlint")
3026
}
3127

3228
configurations.transitiveSourcesElements {

0 commit comments

Comments
 (0)