Skip to content

Commit

Permalink
build(gradle): fix minimization failing for invalid jsons during prep…
Browse files Browse the repository at this point in the history
…areRunDataCompile task
  • Loading branch information
Elenterius committed Dec 11, 2024
1 parent e0b9d11 commit a7a3b77
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ tasks.named('processResources', ProcessResources).configure {
}

private void minifyJsons(String fdir) {
for (final def taskName in getGradle().getStartParameter().getTaskNames()) {
if (taskName.toLowerCase().contains("rundata")) {
return //skip minimization of jsons during any RunData tasks because they will be (re-)generated during this task and should only be minimized for builds anyways
}
}

print "minmizing jsons..."
long startTime = System.nanoTime()
for (File file in fileTree(dir: fdir, include: "**/*.json")) {
Expand Down

0 comments on commit a7a3b77

Please sign in to comment.