Cache the SDK and Gradle in the Android release, and run Gradle once #30

Merged
brian merged 1 commit from test into main 2026-10-02 14:30:02 +00:00
Owner

A release took about five minutes, all of it from an empty container: about a
minute fetching Gradle, every dependency and the SDK, then two separate Gradle
runs, each starting and configuring the project.

  • Cache /opt/android-sdk, and skip the SDK install on a hit. The check that the
    platform is present now runs either way.
  • Cache ~/.gradle (wrapper, dependencies, and the build cache that
    gradle.properties already turns on), keyed on the build files, with a prefix
    fallback so a dependency bump starts from the last entry.
  • Install build-tools 34.0.0, AGP 8.7's default. 35.0.0 went unused while
    Gradle downloaded 34.0.0 itself on every run.
  • Tests and assembleRelease in one invocation. A failing test still fails
    the step, and nothing is published.

Both caches are best-effort: without a cache server, actions/cache warns and
the run downloads everything as before.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

A release took about five minutes, all of it from an empty container: about a minute fetching Gradle, every dependency and the SDK, then two separate Gradle runs, each starting and configuring the project. - Cache /opt/android-sdk, and skip the SDK install on a hit. The check that the platform is present now runs either way. - Cache ~/.gradle (wrapper, dependencies, and the build cache that gradle.properties already turns on), keyed on the build files, with a prefix fallback so a dependency bump starts from the last entry. - Install build-tools 34.0.0, AGP 8.7's default. 35.0.0 went unused while Gradle downloaded 34.0.0 itself on every run. - Tests and assembleRelease in one invocation. A failing test still fails the step, and nothing is published. Both caches are best-effort: without a cache server, actions/cache warns and the run downloads everything as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A release took about five minutes, all of it from an empty container: about a
minute fetching Gradle, every dependency and the SDK, then two separate Gradle
runs, each starting and configuring the project.

- Cache /opt/android-sdk, and skip the SDK install on a hit. The check that the
  platform is present now runs either way.
- Cache ~/.gradle (wrapper, dependencies, and the build cache that
  gradle.properties already turns on), keyed on the build files, with a prefix
  fallback so a dependency bump starts from the last entry.
- Install build-tools 34.0.0, AGP 8.7's default. 35.0.0 went unused while
  Gradle downloaded 34.0.0 itself on every run.
- Tests and assembleRelease in one invocation. A failing test still fails
  the step, and nothing is published.

Both caches are best-effort: without a cache server, actions/cache warns and
the run downloads everything as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brian merged commit bd8bb8d096 into main 2026-10-02 14:30:02 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
brian/Journal!30
No description provided.