Skip to content

Commit 1c82244

Browse files
committed
Use spotless plugin for formatting
1 parent 1840367 commit 1c82244

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

build.gradle

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
2-
id "java"
2+
id "java-library"
33
id "maven-publish"
4-
id "com.github.sherter.google-java-format" version "0.9"
4+
id "com.diffplug.spotless" version "7.1.0"
55
}
66

77
group = "com.github.malczuuu"
@@ -35,8 +35,28 @@ publishing {
3535
}
3636
}
3737

38-
googleJavaFormat {
39-
toolVersion = "1.26.0"
38+
spotless {
39+
format "misc", {
40+
target "*.gradle", ".gitattributes", ".gitignore"
41+
42+
trimTrailingWhitespace()
43+
leadingTabsToSpaces(4)
44+
endWithNewline()
45+
}
46+
47+
format "yaml", {
48+
target "**/*.yml", "**/*.yaml"
49+
50+
trimTrailingWhitespace()
51+
leadingTabsToSpaces(2)
52+
endWithNewline()
53+
}
54+
55+
java {
56+
target "src/**/*.java"
57+
58+
googleJavaFormat("1.27.0")
59+
}
4060
}
4161

4262
tasks.named("test") {

0 commit comments

Comments
 (0)