Skip to content

Commit

Permalink
Upgrade more gradle plugin dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg committed Jul 21, 2023
1 parent cd01d55 commit 4bafeed
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
3 changes: 1 addition & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ repositories {
}

dependencies {
implementation("com.diffplug.spotless:spotless-plugin-gradle:5.16.0")
implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.17")
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.20.0")
}
36 changes: 33 additions & 3 deletions buildSrc/src/main/kotlin/otel.spotless-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,54 @@ spotless {
}
plugins.withId("org.jetbrains.kotlin.jvm") {
kotlin {
ktlint().userData(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports"))
ktlint().editorConfigOverride(mapOf(
"indent_size" to "2",
"continuation_indent_size" to "2",
"max_line_length" to "160",
"insert_final_newline" to "true",
"ktlint_standard_no-wildcard-imports" to "disabled",
// ktlint does not break up long lines, it just fails on them
"ktlint_standard_max-line-length" to "disabled",
// ktlint makes it *very* hard to locate where this actually happened
"ktlint_standard_trailing-comma-on-call-site" to "disabled",
// depends on ktlint_standard_wrapping
"ktlint_standard_trailing-comma-on-declaration-site" to "disabled",
// also very hard to find out where this happens
"ktlint_standard_wrapping" to "disabled"
))
licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|class|// Includes work from:)")
}
}
kotlinGradle {
ktlint().userData(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports"))
ktlint().editorConfigOverride(mapOf(
"indent_size" to "2",
"continuation_indent_size" to "2",
"max_line_length" to "160",
"insert_final_newline" to "true",
"ktlint_standard_no-wildcard-imports" to "disabled",
// ktlint does not break up long lines, it just fails on them
"ktlint_standard_max-line-length" to "disabled",
// ktlint makes it *very* hard to locate where this actually happened
"ktlint_standard_trailing-comma-on-call-site" to "disabled",
// depends on ktlint_standard_wrapping
"ktlint_standard_trailing-comma-on-declaration-site" to "disabled",
// also very hard to find out where this happens
"ktlint_standard_wrapping" to "disabled"
))
}
format("misc") {
// not using "**/..." to help keep spotless fast
target(
".gitignore",
".gitattributes",
".gitconfig",
".editorconfig",
"*.md",
"src/**/*.md",
"docs/**/*.md",
"*.sh",
"src/**/*.properties")
"src/**/*.properties",
)
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
Expand Down

0 comments on commit 4bafeed

Please sign in to comment.