From 1f37bc2d63a3d0e07a58e3ba362008ead69ca890 Mon Sep 17 00:00:00 2001 From: bmalinowsky Date: Sun, 28 Jul 2024 11:32:35 +0200 Subject: [PATCH] Execute git command in current project dir to work with composite builds --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ac488df..33aac05 100644 --- a/build.gradle +++ b/build.gradle @@ -126,7 +126,7 @@ dependencies { runtimeOnly 'org.slf4j:slf4j-simple:2.0.9' } -def gitHash = 'git rev-parse --verify --short HEAD'.execute().text.trim() +def gitHash = "git -C $projectDir rev-parse --verify --short HEAD".execute().text.trim() def buildDate = java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss z") .withZone(ZoneId.of("UTC")) .format(Instant.now())