From 0dee2e831910947cd4e7a6a6cda8ffc775d09be8 Mon Sep 17 00:00:00 2001 From: Code Toad <55628278+goatfanboi23@users.noreply.github.com> Date: Sun, 14 Jul 2024 12:08:03 -0400 Subject: [PATCH] build: correct grgit null reference in git-less environments, close #345 (#347) Issue Summary: when sources are downloaded (not through git) the build fails because of a null reference. Fix: replace null reference with empty string Co-authored-by: codetoad --- build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 04e90cd6..1376862b 100644 --- a/build.gradle +++ b/build.gradle @@ -99,9 +99,11 @@ allprojects { } processResources { + def tokenMap = rootProject.ext.properties + tokenMap.merge("grgit",'',(s, s2) -> s) filesMatching(['**/*.json', '**/*.yml']) { filter ReplaceTokens as Class, beginToken: '${', endToken: '}', - tokens: rootProject.ext.properties + tokens: tokenMap } } }