From f71a8b786b6f87bb46906cd4bae352bd30f5795c Mon Sep 17 00:00:00 2001 From: Zan Markan Date: Tue, 4 Jun 2024 16:54:34 +0100 Subject: [PATCH] base64 encoded signing keys --- gradle/deploy.gradle | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gradle/deploy.gradle b/gradle/deploy.gradle index 6a13b04..37b1729 100644 --- a/gradle/deploy.gradle +++ b/gradle/deploy.gradle @@ -1,11 +1,20 @@ apply plugin: 'maven-publish' apply plugin: 'signing' -def signingKey = findProperty("GPG_SIGNING_IN_MEMORY_KEY") +def signingKeyBase64 = findProperty("GPG_SIGNING_IN_MEMORY_KEY") def signingPassword = findProperty("GPG_SIGNING_IN_MEMORY_KEY_PWD") +def base64Decode(encodedString){ + if(encodedString != null) { + byte[] decoded = encodedString.decodeBase64() + String decode = new String(decoded) + return decode + } + return null; +} + signing { - useInMemoryPgpKeys(signingKey, signingPassword) + useInMemoryPgpKeys(base64Decode(signingKeyBase64), signingPassword) sign publishing.publications }