mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-20 15:39:36 +00:00
Update build.gradle.kts
This commit is contained in:
@@ -37,10 +37,14 @@ subprojects {
|
|||||||
|
|
||||||
fun versionBanner(): String {
|
fun versionBanner(): String {
|
||||||
val os = ByteArrayOutputStream()
|
val os = ByteArrayOutputStream()
|
||||||
|
try {
|
||||||
project.exec {
|
project.exec {
|
||||||
commandLine = "git rev-parse --short=8 HEAD".split(" ")
|
commandLine = "git rev-parse --short=8 HEAD".split(" ")
|
||||||
standardOutput = os
|
standardOutput = os
|
||||||
}
|
}
|
||||||
|
} catch (e: ExecException) {
|
||||||
|
return "Unknown"
|
||||||
|
}
|
||||||
return String(os.toByteArray()).trim()
|
return String(os.toByteArray()).trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +55,7 @@ fun builder(): String {
|
|||||||
commandLine = "git config user.name".split(" ")
|
commandLine = "git config user.name".split(" ")
|
||||||
standardOutput = os
|
standardOutput = os
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: ExecException) {
|
||||||
return "Unknown"
|
return "Unknown"
|
||||||
}
|
}
|
||||||
return String(os.toByteArray()).trim()
|
return String(os.toByteArray()).trim()
|
||||||
|
|||||||
Reference in New Issue
Block a user