diff --git a/build.gradle b/build.gradle index 872edd8a3b..b827122db5 100644 --- a/build.gradle +++ b/build.gradle @@ -367,12 +367,10 @@ publishMods { String calculateGitHash() { try { - ByteArrayOutputStream stdout = new ByteArrayOutputStream() - exec { + def output = providers.exec { commandLine("git", "rev-parse", "HEAD") - standardOutput = stdout } - return stdout.toString().trim() + return output.standardOutput.asText.get().trim() } catch(Throwable ignored) { return "unknown" } @@ -380,14 +378,12 @@ String calculateGitHash() { boolean hasUnstaged() { try { - ByteArrayOutputStream stdout = new ByteArrayOutputStream() - exec { + def output = providers.exec { commandLine("git", "status", "--porcelain") - standardOutput = stdout } - String result = stdout.toString().replace("/M gradlew(\\.bat)?/", "").trim() + String result = output.standardOutput.asText.get().replace("/M gradlew(\\.bat)?/", "").trim() if (!result.isEmpty()) - println("Found stageable results:\n${result}\n") + println("Found stageable results:\n ${result}\n") return !result.isEmpty() } catch(Throwable ignored) { return false diff --git a/gradle.properties b/gradle.properties index 9640991d93..7366000751 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,9 @@ # This is required to provide enough memory for the Minecraft decompilation process. org.gradle.jvmargs = -Xmx3G org.gradle.daemon = false +org.gradle.parallel = true +org.gradle.caching = true +org.gradle.configuration-cache = true # mod version info # build_info_mod_version is the version that gets filled into CreateBuildInfo.java