0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-19 17:02:13 +02:00

Add spotless check for JSON files

This commit is contained in:
Alexander01998 2024-06-23 10:09:43 +02:00
parent 0dce05bd3f
commit cd942214f6
2 changed files with 9 additions and 3 deletions

View File

@ -4,11 +4,13 @@ on:
push:
paths:
- '**.java'
- '**.json'
- 'gradle**'
- 'build.gradle'
pull_request:
paths:
- '**.java'
- '**.json'
- 'gradle**'
- 'build.gradle'
# Makes it possible to run this workflow manually from the Actions tab

View File

@ -41,7 +41,7 @@ dependencies {
//
// In other words, Wurst won't compile without this library,
// even though it's Minecraft that actually uses it.
modImplementation 'com.google.code.findbugs:jsr305:3.0.2'
modImplementation "com.google.code.findbugs:jsr305:3.0.2"
}
loom {
@ -73,17 +73,21 @@ java {
jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}"}
rename {"${it}_${project.base.archivesName.get()}"}
}
}
spotless {
lineEndings("WINDOWS")
java {
removeUnusedImports()
indentWithTabs()
trimTrailingWhitespace()
eclipse().configFile(file("codestyle/formatter.xml"))
lineEndings('WINDOWS')
}
json {
target "src/**/*.json"
gson().indentWithSpaces(2).version("2.10.1")
}
}