Minify json files and images
11
build.gradle
@@ -1,3 +1,6 @@
|
|||||||
|
import groovy.json.JsonSlurper
|
||||||
|
import groovy.json.JsonOutput
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "architectury-plugin" version "3.4-SNAPSHOT"
|
id "architectury-plugin" version "3.4-SNAPSHOT"
|
||||||
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
|
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
|
||||||
@@ -58,6 +61,14 @@ allprojects {
|
|||||||
return changes.toString()
|
return changes.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
processResources {
|
||||||
|
// Minify json resources
|
||||||
|
doLast {
|
||||||
|
fileTree(dir: outputs.files.asPath, include: "**/*.json").each {
|
||||||
|
File file -> file.text = JsonOutput.toJson(new JsonSlurper().parse(file))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
withSourcesJar()
|
withSourcesJar()
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 136 B |
|
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 136 B |
|
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 114 B |
@@ -41,7 +41,7 @@
|
|||||||
},
|
},
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabric-resource-loader-v0": "*",
|
"fabric-resource-loader-v0": "*",
|
||||||
"minecraft": ">=1.20.4"
|
"minecraft": ">=1.21"
|
||||||
},
|
},
|
||||||
|
|
||||||
"mixins": [
|
"mixins": [
|
||||||
|
|||||||