Skip to content

build(secrets): enforce valid API keys in secrets.properties#2378

Open
dkhawk wants to merge 1 commit into
mainfrom
feat-my-cool-new-feature
Open

build(secrets): enforce valid API keys in secrets.properties#2378
dkhawk wants to merge 1 commit into
mainfrom
feat-my-cool-new-feature

Conversation

@dkhawk
Copy link
Copy Markdown
Contributor

@dkhawk dkhawk commented May 22, 2026

Context

This PR introduces a build-time check to prevent silent build successes that result in immediate runtime crashes when required API keys (like MAPS_API_KEY) are missing or set to default placeholders in secrets.properties.

Changes

  • Added gradle/secrets-enforcement.gradle.kts to validate the presence and validity of critical API keys before build/install tasks run.
  • Applied the enforcement script in the root build.gradle.kts.

Introduce a Gradle build-time check to enforce that required API keys
are present and valid in the secrets.properties file before debug
build or installation tasks proceed.

This avoids silent build successes that inevitably lead to immediate
crashes at runtime when required keys (such as MAPS_API_KEY) are
missing or left as default placeholder values.

- Add gradle/secrets-enforcement.gradle.kts to parse and validate
  keys in secrets.properties against the standard Google API key
  signature pattern (AIza...).
- Apply the enforcement script globally in the root build.gradle.kts
  for non-CI environments.
- Support IDE synchronization and test task bypasses to preserve developer
  workflows.
@dkhawk dkhawk requested a review from kikoso May 22, 2026 18:20
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.

1 participant