Skip to content

Commit

Permalink
Use in-memory key for signing (#1046) (#1047)
Browse files Browse the repository at this point in the history
## Goal

Cherrypick of #1046 into 6.9 release branch
  • Loading branch information
bidetofevil authored Jul 4, 2024
1 parent 6476bea commit fd143e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 0 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ nexusPublishing {
}

allprojects {
ext.properties["signing.keyId"] = System.getenv("mavenSigningKeyId") ?: localProperties.getProperty("signing.keyId")
ext.properties["signing.secretKeyRingFile"] = System.getenv("mavenSigningKeyRingFile") ?: localProperties.getProperty("signing.secretKeyRingFile")
ext.properties["signing.password"] = System.getenv("mavenSigningKeyPassword") ?: localProperties.getProperty("signing.password")

repositories {
google()
maven(url = "https://plugins.gradle.org/m2/")
Expand Down
6 changes: 6 additions & 0 deletions buildSrc/src/main/kotlin/embrace-defaults.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ android {
}
}
}

buildTypes {
named("release") {
isMinifyEnabled = false
}
}

publishing {

// create component with single publication variant
Expand Down Expand Up @@ -197,6 +199,10 @@ publishing {
}

signing {
val keyId = System.getenv("mavenSigningKeyId")
val key = System.getenv("mavenSigningKeyRingFileEncoded")
val password = System.getenv("mavenSigningKeyPassword")
useInMemoryPgpKeys(keyId, key, password)
sign(publishing.publications.getByName("release"))
}

Expand Down

0 comments on commit fd143e7

Please sign in to comment.