mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Elephant taming
- Enable parallel and caching args - Modify tasks to support configuration cache
This commit is contained in:
parent
d506625266
commit
88907795fe
2 changed files with 8 additions and 9 deletions
12
build.gradle
12
build.gradle
|
@ -367,12 +367,10 @@ publishMods {
|
||||||
|
|
||||||
String calculateGitHash() {
|
String calculateGitHash() {
|
||||||
try {
|
try {
|
||||||
ByteArrayOutputStream stdout = new ByteArrayOutputStream()
|
def output = providers.exec {
|
||||||
exec {
|
|
||||||
commandLine("git", "rev-parse", "HEAD")
|
commandLine("git", "rev-parse", "HEAD")
|
||||||
standardOutput = stdout
|
|
||||||
}
|
}
|
||||||
return stdout.toString().trim()
|
return output.standardOutput.asText.get().trim()
|
||||||
} catch(Throwable ignored) {
|
} catch(Throwable ignored) {
|
||||||
return "unknown"
|
return "unknown"
|
||||||
}
|
}
|
||||||
|
@ -380,12 +378,10 @@ String calculateGitHash() {
|
||||||
|
|
||||||
boolean hasUnstaged() {
|
boolean hasUnstaged() {
|
||||||
try {
|
try {
|
||||||
ByteArrayOutputStream stdout = new ByteArrayOutputStream()
|
def output = providers.exec {
|
||||||
exec {
|
|
||||||
commandLine("git", "status", "--porcelain")
|
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())
|
if (!result.isEmpty())
|
||||||
println("Found stageable results:\n ${result}\n")
|
println("Found stageable results:\n ${result}\n")
|
||||||
return !result.isEmpty()
|
return !result.isEmpty()
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
# This is required to provide enough memory for the Minecraft decompilation process.
|
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||||
org.gradle.jvmargs = -Xmx3G
|
org.gradle.jvmargs = -Xmx3G
|
||||||
org.gradle.daemon = false
|
org.gradle.daemon = false
|
||||||
|
org.gradle.parallel = true
|
||||||
|
org.gradle.caching = true
|
||||||
|
org.gradle.configuration-cache = true
|
||||||
|
|
||||||
# mod version info
|
# mod version info
|
||||||
# build_info_mod_version is the version that gets filled into CreateBuildInfo.java
|
# build_info_mod_version is the version that gets filled into CreateBuildInfo.java
|
||||||
|
|
Loading…
Add table
Reference in a new issue