9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2025-12-19 15:09:24 +00:00

Update build.gradle.kts

This commit is contained in:
XiaoMoMi
2024-08-29 01:39:45 +08:00
parent c1faf0dda3
commit a060298f49

View File

@@ -37,9 +37,13 @@ subprojects {
fun versionBanner(): String {
val os = ByteArrayOutputStream()
project.exec {
commandLine = "git rev-parse --short=8 HEAD".split(" ")
standardOutput = os
try {
project.exec {
commandLine = "git rev-parse --short=8 HEAD".split(" ")
standardOutput = os
}
} catch (e: ExecException) {
return "Unknown"
}
return String(os.toByteArray()).trim()
}
@@ -51,7 +55,7 @@ fun builder(): String {
commandLine = "git config user.name".split(" ")
standardOutput = os
}
} catch (e: Exception) {
} catch (e: ExecException) {
return "Unknown"
}
return String(os.toByteArray()).trim()