From 14b2c1655501cb2678cf61a034ddb83d30e07011 Mon Sep 17 00:00:00 2001 From: lukellmann Date: Sat, 8 Jul 2023 14:38:35 +0200 Subject: [PATCH] Fix NullPointerException while applying kord-publishing --- buildSrc/src/main/kotlin/kord-publishing.gradle.kts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/buildSrc/src/main/kotlin/kord-publishing.gradle.kts b/buildSrc/src/main/kotlin/kord-publishing.gradle.kts index 30e9c7a19ac..a001f7113cc 100644 --- a/buildSrc/src/main/kotlin/kord-publishing.gradle.kts +++ b/buildSrc/src/main/kotlin/kord-publishing.gradle.kts @@ -71,11 +71,9 @@ publishing { } } -if (isRelease) { - signing { - val secretKey = String(Base64.getDecoder().decode(getenv("SIGNING_KEY"))) - val password = getenv("SIGNING_PASSWORD") - useInMemoryPgpKeys(secretKey, password) - sign(publishing.publications) - } +signing { + val secretKey = getenv("SIGNING_KEY")?.let { String(Base64.getDecoder().decode(it)) } + val password = getenv("SIGNING_PASSWORD") + useInMemoryPgpKeys(secretKey, password) + sign(publishing.publications) }