Hello. I recently tried to include Create mod's source using includeBuild with configuration cache enabled. but it failed to configure Create project because it was trying to run git command. but my root project does not have git configured.
I think the git command was launched from my project, not from Create.
Below is my suggestion for tweaking build.gradle so that git command always runs from create's directory:
--- a/build.gradle (revision 0a17a7243c3e5e6e3ceb34450d9c6df240af1b83)
+++ b/build.gradle (date 1775295971648)
@@ -313,6 +313,7 @@
String calculateGitHash() {
try {
ExecOutput output = providers.exec {
+ it.workingDir(project.projectDir)
commandLine("git", "rev-parse", "HEAD")
}
return output.standardOutput.asText.get().trim()
@@ -323,7 +324,9 @@
boolean hasUnstaged() {
try {
+ var projectDir = project.projectDir
ExecOutput output = providers.exec {
+ it.workingDir(projectDir.path)
commandLine("git", "status", "--porcelain")
}
String result = output.standardOutput.asText.get().replace("/M gradlew(\\.bat)?/", "").trim()
Above change indeed fixed the issue for me now.
This could be PR on my end but seeing that this only changes 3 lines I figured maintainers doing it manually would've be more easy
Hello. I recently tried to include Create mod's source using
includeBuildwith configuration cache enabled. but it failed to configure Create project because it was trying to rungitcommand. but my root project does not have git configured.I think the git command was launched from my project, not from Create.
Below is my suggestion for tweaking build.gradle so that git command always runs from create's directory:
Above change indeed fixed the issue for me now.
This could be PR on my end but seeing that this only changes 3 lines I figured maintainers doing it manually would've be more easy