Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .buildkite/commands/install-secrets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -euo pipefail

echo "--- :closed_lock_with_key: Installing Secrets"

a8c_secrets_bin_dir="$HOME/.local/bin"
install_a8c-secrets_binary --install-dir "$a8c_secrets_bin_dir"
export PATH="$a8c_secrets_bin_dir:$PATH"

a8c-secrets decrypt --non-interactive
3 changes: 1 addition & 2 deletions .buildkite/commands/prototype-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
echo "--- :rubygems: Setting up Gems"
install_gems

echo "--- :closed_lock_with_key: Installing Secrets"
bundle exec fastlane run configure_apply
"$(dirname "${BASH_SOURCE[0]}")/install-secrets.sh"

echo "--- :hammer_and_wrench: Building"
bundle exec fastlane build_and_upload_prototype_build
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ SDK version is derived from `git describe --tags`. Non-tag builds append `-SNAPS
- **Screenshot test baselines**: Must pass `-Pscreenshot` flag for Roborazzi tasks. Baselines live in `gravatar-ui/screenshotTests/roborazzi/` and `gravatar-quickeditor/screenshotTests/roborazzi/`.
- **Binary compatibility**: Public API changes require running `./gradlew apiDump` to update `.api` files. CI enforces compatibility via `apiCheck`.
- **Explicit API mode**: Enabled in strict mode for library modules — all public declarations require explicit visibility modifiers. See [Explicit API mode](docs/sdk-technical-details/sdk-technical-details.md#explicit-api-mode).
- **`secrets.properties`**: Required for the demo app but managed via `.configure` — never commit actual secrets.
- **`secrets.properties`**: Required for the demo app but decrypted outside the checkout by `a8c-secrets decrypt` — never commit actual secrets.
12 changes: 9 additions & 3 deletions demo-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ plugins {
}

fun secretProperties(): Properties {
val repoId = rootProject.file(".a8c-secrets/repo-id").readText().trim()
val a8cSecretsFile = File(System.getProperty("user.home"), ".a8c-secrets/$repoId/secrets.properties")
val localSecretsFile = rootProject.file("secrets.properties")

val properties = Properties()
rootProject.file("secrets.properties")
.takeIf { it.exists() }
listOf(a8cSecretsFile, localSecretsFile)
.firstOrNull { it.exists() }
?.let { properties.load(FileInputStream(it)) }
?: logger.warn("Secret properties file not found. Quick Editor won't work properly.")
?: logger.warn(
"$a8cSecretsFile not found. Run `a8c-secrets decrypt`, or Quick Editor won't work properly.",
)
return properties
}

Expand Down