From de72fc17147fef1e0a8ebda2f234ba4ee6200845 Mon Sep 17 00:00:00 2001 From: Hendrix-Shen Date: Tue, 9 Apr 2024 16:54:54 +0800 Subject: [PATCH] Fix build script Signed-off-by: Hendrix-Shen --- settings.gradle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/settings.gradle b/settings.gradle index 280bd874..ac739cfc 100644 --- a/settings.gradle +++ b/settings.gradle @@ -56,8 +56,12 @@ ext { } getOrDefault = { String key, String defaultValue -> - String value - (value = ext.getProperty(key)) && !value.isEmpty() ? value : defaultValue + if (!ext.has(key)) { + return defaultValue + } + + String value = ext.getProperty(key) + return value.isEmpty() ? defaultValue : value } }