mirror of
https://github.com/TeamMidnightDust/MidnightLib.git
synced 2025-12-16 01:15:08 +01:00
Minify json files and images
This commit is contained in:
11
build.gradle
11
build.gradle
@@ -1,3 +1,6 @@
|
||||
import groovy.json.JsonSlurper
|
||||
import groovy.json.JsonOutput
|
||||
|
||||
plugins {
|
||||
id "architectury-plugin" version "3.4-SNAPSHOT"
|
||||
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
|
||||
@@ -58,6 +61,14 @@ allprojects {
|
||||
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 {
|
||||
withSourcesJar()
|
||||
|
||||
Reference in New Issue
Block a user