Skip to content

build: stop keeping credential placeholders in gradle.properties - #8

Open
kikoso wants to merge 1 commit into
mainfrom
build/no-credential-placeholders
Open

kikoso wants to merge 1 commit into
mainfrom
build/no-credential-placeholders

Conversation

@kikoso

@kikoso kikoso commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

gradle.properties is committed with empty mavenCentralUsername=, mavenCentralPassword= and signing.*= entries, which the publish workflow fills in with sed. Empty secret slots in a tracked file make it easy for someone publishing locally to fill them in and commit them by accident.

  • gradle.properties: the five placeholders are replaced with a comment pointing to ~/.gradle/gradle.properties or ORG_GRADLE_PROJECT_* variables.
  • publish.yml: the step now appends the five properties with printf instead of sed-replacing the placeholders. It is still the same file in the CI workspace, and the property names and secrets haven't changed.

This also fixes a latent bug: the old step only escaped the Sonatype password. A GPG key ID or password containing , or & would have broken the sed expression or written a wrong value. printf '%s' writes the values as is. I ran the new step locally with values containing , & and / and the output is correct.

Also checked: ./gradlew publishToMavenLocal still configures and builds all three AARs with no credentials set (signing is skipped as before). I could not run the real publish job.

@kikoso
kikoso requested a review from a team as a code owner November 6, 2026 10:50
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

Coverage (unit tests)

No unit baseline recorded in coverage/history.csv yet, so this run only reports absolute numbers.

Module Line % Change Branch % Change
golden-testing 90.42% new 58.00% new
robolectric-testing 84.06% new 51.87% new
visual-testing 36.54% new 25.07% new
TOTAL 78.88% new 44.10% new

Line and branch coverage from unit test reports. History is recorded in coverage/history.csv after each merge to main.

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