Skip to content

Commit cbb3765

Browse files
Add spotless check for JSON files
1 parent 41210c3 commit cbb3765

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/gradle.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ on:
44
push:
55
paths:
66
- '**.java'
7+
- '**.json'
78
- 'gradle**'
89
- 'build.gradle'
910
pull_request:
1011
paths:
1112
- '**.java'
13+
- '**.json'
1214
- 'gradle**'
1315
- 'build.gradle'
1416
# Makes it possible to run this workflow manually from the Actions tab

build.gradle

+7-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dependencies {
4141
//
4242
// In other words, Wurst won't compile without this library,
4343
// even though it's Minecraft that actually uses it.
44-
modImplementation 'com.google.code.findbugs:jsr305:3.0.2'
44+
modImplementation "com.google.code.findbugs:jsr305:3.0.2"
4545
}
4646

4747
loom {
@@ -73,17 +73,21 @@ java {
7373

7474
jar {
7575
from("LICENSE") {
76-
rename { "${it}_${project.base.archivesName.get()}"}
76+
rename {"${it}_${project.base.archivesName.get()}"}
7777
}
7878
}
7979

8080
spotless {
81+
lineEndings("WINDOWS")
8182
java {
8283
removeUnusedImports()
8384
indentWithTabs()
8485
trimTrailingWhitespace()
8586
eclipse().configFile(file("codestyle/formatter.xml"))
86-
lineEndings('WINDOWS')
87+
}
88+
json {
89+
target "src/**/*.json"
90+
gson().indentWithSpaces(2).version("2.10.1")
8791
}
8892
}
8993

0 commit comments

Comments
 (0)