add info about used commit to sentry reports

This commit is contained in:
Julian Krings
2025-07-23 15:07:06 +02:00
parent 3949468a60
commit e5f2fee926
3 changed files with 17 additions and 0 deletions
+8
View File
@@ -137,6 +137,14 @@ tasks {
"version" to rootProject.version,
"apiVersion" to apiVersion,
"main" to main,
"environment" to if (project.hasProperty("release")) "production" else "development",
"commit" to provider {
ProcessBuilder("git", "rev-parse", "HEAD")
.redirectOutput(ProcessBuilder.Redirect.PIPE)
.start()
.inputStream.bufferedReader().readText().trim()
.takeIf { it.length == 40 } ?: "unknown"
}
)
filesMatching("**/plugin.yml") {
expand(inputs.properties)