Skip to content

Commit 4bafeed

Browse files
committed
Upgrade more gradle plugin dependencies
1 parent cd01d55 commit 4bafeed

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed

buildSrc/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ repositories {
99
}
1010

1111
dependencies {
12-
implementation("com.diffplug.spotless:spotless-plugin-gradle:5.16.0")
13-
implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.17")
12+
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.20.0")
1413
}

buildSrc/src/main/kotlin/otel.spotless-conventions.gradle.kts

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,54 @@ spotless {
2222
}
2323
plugins.withId("org.jetbrains.kotlin.jvm") {
2424
kotlin {
25-
ktlint().userData(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports"))
25+
ktlint().editorConfigOverride(mapOf(
26+
"indent_size" to "2",
27+
"continuation_indent_size" to "2",
28+
"max_line_length" to "160",
29+
"insert_final_newline" to "true",
30+
"ktlint_standard_no-wildcard-imports" to "disabled",
31+
// ktlint does not break up long lines, it just fails on them
32+
"ktlint_standard_max-line-length" to "disabled",
33+
// ktlint makes it *very* hard to locate where this actually happened
34+
"ktlint_standard_trailing-comma-on-call-site" to "disabled",
35+
// depends on ktlint_standard_wrapping
36+
"ktlint_standard_trailing-comma-on-declaration-site" to "disabled",
37+
// also very hard to find out where this happens
38+
"ktlint_standard_wrapping" to "disabled"
39+
))
2640
licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|class|// Includes work from:)")
2741
}
2842
}
2943
kotlinGradle {
30-
ktlint().userData(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports"))
44+
ktlint().editorConfigOverride(mapOf(
45+
"indent_size" to "2",
46+
"continuation_indent_size" to "2",
47+
"max_line_length" to "160",
48+
"insert_final_newline" to "true",
49+
"ktlint_standard_no-wildcard-imports" to "disabled",
50+
// ktlint does not break up long lines, it just fails on them
51+
"ktlint_standard_max-line-length" to "disabled",
52+
// ktlint makes it *very* hard to locate where this actually happened
53+
"ktlint_standard_trailing-comma-on-call-site" to "disabled",
54+
// depends on ktlint_standard_wrapping
55+
"ktlint_standard_trailing-comma-on-declaration-site" to "disabled",
56+
// also very hard to find out where this happens
57+
"ktlint_standard_wrapping" to "disabled"
58+
))
3159
}
3260
format("misc") {
3361
// not using "**/..." to help keep spotless fast
3462
target(
63+
".gitignore",
3564
".gitattributes",
3665
".gitconfig",
3766
".editorconfig",
3867
"*.md",
3968
"src/**/*.md",
4069
"docs/**/*.md",
4170
"*.sh",
42-
"src/**/*.properties")
71+
"src/**/*.properties",
72+
)
4373
indentWithSpaces()
4474
trimTrailingWhitespace()
4575
endWithNewline()

0 commit comments

Comments
 (0)