Skip to content

Commit

Permalink
base64 encoded signing keys
Browse files Browse the repository at this point in the history
  • Loading branch information
zmarkan committed Jun 4, 2024
1 parent 9f413ab commit f71a8b7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions gradle/deploy.gradle
Original file line number Diff line number Diff line change
@@ -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
}

Expand Down

0 comments on commit f71a8b7

Please sign in to comment.