Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .github/workflows/android-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: "9.5.0"
# Optional: persists the Gradle configuration cache across runs when
# a GRADLE_ENCRYPTION_KEY secret exists; harmless when unset. Safe
# here: test runs have no keystore, so their configuration cache
# contains no signing data (unlike Cut Release, which never sets this).
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: Run unit tests
working-directory: android_app
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
distribution: temurin
java-version: "17"

# No cache-encryption-key here on purpose: this job's configuration cache
# embeds the signing config, so it must never be persisted to the Actions
# cache. It is rebuilt each run (a few seconds); the dependency cache and
# the single combined Gradle invocation carry the speedup.
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
Expand Down Expand Up @@ -87,13 +91,12 @@ jobs:
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.ANDROID_RELEASE_KEY_ALIAS }}
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEY_PASSWORD }}

- name: Run unit tests
# One Gradle invocation for both: a failing test still aborts the release
# before anything is pushed, and the build pays the configuration phase
# and daemon start only once.
- name: Run tests and build signed release APK
working-directory: android_app
run: gradle test

- name: Build signed release APK
working-directory: android_app
run: gradle assembleRelease
run: gradle test assembleRelease

- name: Name release APK
id: apk
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
- Speed up Gradle builds locally and in CI: enable the configuration cache and build cache, and make Cut Release run the tests and the signed build in a single Gradle invocation.
- Run CI tests only on pull requests: drop the push-to-master trigger, since everything reaching master goes through a tested PR or the Cut Release workflow, which runs the tests itself.

## v1.1.0 - 2026-07-03
Expand Down
7 changes: 7 additions & 0 deletions android_app/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
android.useAndroidX=true

# Cache Gradle's configuration phase and task outputs. In CI, setup-gradle
# persists task outputs across runs; configuration-cache data is only persisted
# when a GRADLE_ENCRYPTION_KEY secret is configured (it can contain signing
# credentials, so it is never uploaded unencrypted).
org.gradle.configuration-cache=true
org.gradle.caching=true
Loading