FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

build: make GPG signing conditional in PublishingConventionPlugin for local publishing by dkhawk · Pull Request #1743 · googlemaps/android-maps-utils · GitHub

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .kt  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,19 @@ class PublishingConventionPlugin : Plugin<Project> {
)

publishToMavenCentral()
signAllPublications()

// Only enable GPG publication signing when signing credentials are present.
// Why: When signAllPublications() is invoked unconditionally, the Maven Publish plugin
// registers GPG signature files (.asc) as mandatory artifacts of the publication.
// On local developer machines without GPG keys configured, running tasks such as
// './gradlew publishToMavenLocal' fails because the .asc files cannot be generated.
// Making signing conditional allows local publishing to succeed without credentials
// while ensuring all CI and release pipeline builds are properly signed.
val isSigningConfigured = !providers.gradleProperty("signing.keyId").getOrElse("").isEmpty() ||
!providers.gradleProperty("signing.secretKeyRingFile").getOrElse("").isEmpty()
if (isSigningConfigured) {
signAllPublications()
}

val artifactIdName = when (project.name) {
"maps-utils" -> "android-maps-utils"
Expand Down

Back | FazBrowse Home | New Git URL