From c1aee648a043d84eacaeab28a0f69d59539d35e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Rebelo?= Date: Sun, 26 Apr 2026 20:00:13 +0100 Subject: [PATCH] Fix build when git is not installed --- app/build.gradle | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 7b1b82e3e9..bf1c78cd40 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -31,9 +31,17 @@ tasks.register("buildGitChangelog"){ outputs.file(changelogFile) doLast { - final def allCommits = providers.exec { - commandLine('git', 'log', '--pretty=format:%h %s') - }.standardOutput.asText.get() + final def allCommits + try { + allCommits = providers.exec { + commandLine('git', 'log', '--pretty=format:%h %s') + }.standardOutput.asText.get() + } catch (ignored) { + logger.warn("Skipping git changelog: git is not available") + changelogFile.getParentFile().mkdirs() + changelogFile.write(groovy.xml.XmlUtil.serialize(new Node(null, 'changelog'))) + return + } def commitVersionCode = getVersionCode() def includedCommits = 0