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

build: make GPG signing conditional in PublishingConventionPlugin for local publishing - #1743

Open
dkhawk wants to merge 1 commit into
mainfrom
build/conditional-gpg-signing
Open

build: make GPG signing conditional in PublishingConventionPlugin for local publishing#1743
dkhawk wants to merge 1 commit into
mainfrom
build/conditional-gpg-signing

Conversation

dkhawk commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What this PR does

When developers run ./gradlew publishToMavenLocal on their local machines without configuring GPG signing credentials (signing.keyId, signing.secretKeyRingFile), the build fails with:

Invalid publication 'maven': artifact file does not exist: '.../release-javadoc.jar.asc'

This occurred because signAllPublications() in PublishingConventionPlugin.kt was invoked unconditionally.

This PR wraps signAllPublications() so that it only signs when signing.keyId or signing.secretKeyRingFile is present and non-empty:

val isSigningConfigured = !providers.gradleProperty("signing.keyId").getOrElse("").isEmpty() ||
    !providers.gradleProperty("signing.secretKeyRingFile").getOrElse("").isEmpty()
if (isSigningConfigured) {
    signAllPublications()
}

Verification

  • Executed ./gradlew publishToMavenLocal across all modules: BUILD SUCCESSFUL without .asc signature errors.
  • Verified that all 7 library modules are correctly installed in ~/.m2/repository/com/google/maps/android/.

dkhawk requested review from LoyalAbbas and kikoso August 5, 2026 18:09
… local publishing

- Wrap signAllPublications() in an if-check verifying whether signing.keyId or signing.secretKeyRingFile is configured, preventing local ./gradlew publishToMavenLocal builds from failing with missing .asc signature errors when GPG credentials are omitted.

- Keep full publication signing active whenever GPG credentials are provided on CI or release pipelines.
dkhawk force-pushed the build/conditional-gpg-signing branch from 54a5cf2 to 396aad6 Compare August 5, 2026 18:13

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 42.99% 🍏

There is no coverage information present for the Files changed

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL