Skip to content

Commit

Permalink
Removed json minifier, as it breaks Jenkins builds
Browse files Browse the repository at this point in the history
  • Loading branch information
GirafiStudios committed Mar 21, 2020
1 parent cf80034 commit 6316740
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,4 @@ artifacts {

String getBuildNumber() {
return System.getenv('BUILD_NUMBER') ? ".jenkins" + System.getenv('BUILD_NUMBER') : "";
}

processResources {
// Minifies all .json files when building the mod.
// Source files are not minified, only the jar copies.
doLast {
def jsonMinifyStart = System.currentTimeMillis()
def jsonMinified = 0
def jsonBytesSaved = 0

fileTree(dir: outputs.files.asPath, include: '**/*.json').each {
File file = it
jsonMinified++
def oldLength = file.length()
file.text = JsonOutput.toJson(new JsonSlurper().parse(file))
jsonBytesSaved += oldLength - file.length()
}
println('Minified ' + jsonMinified + ' json files. Saved ' + jsonBytesSaved + ' bytes. Took ' + (System.currentTimeMillis() - jsonMinifyStart) + 'ms.')
}
}

0 comments on commit 6316740

Please sign in to comment.