Skip to content

refactor(build): split build cache into its own settings script#58

Merged
jamesarich merged 1 commit into
mainfrom
claude/trusting-leakey-626f88
Jun 13, 2026
Merged

refactor(build): split build cache into its own settings script#58
jamesarich merged 1 commit into
mainfrom
claude/trusting-leakey-626f88

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

What

Adopt meshtastic-android's build cache implementation by moving the cache config out of develocity.settings.gradle into a dedicated gradle/build-cache.settings.gradle.

Why

Keeps caching concerns separate from build-scan concerns and switches to the standard Gradle cache API, so the build cache no longer depends on the Develocity plugin to function. Mirrors the structure used in Meshtastic-Android.

Changes

  • New gradle/build-cache.settings.gradle — uses the standard top-level buildCache {} API (instead of develocity { buildCache {} }); keeps the getMeshProperty env → local.propertiesconfig.properties walk-up and the fork-safe push gating; uses logger.lifecycle instead of println.
  • gradle/develocity.settings.gradle — stripped the buildCache {} block and the now-unused getMeshProperty helper; now only configures develocity { buildScan {} }.
  • settings.gradle.kts — applies both scripts (build cache, then build scans).

Deviation from the source (intentional)

Meshtastic-android applies this file from both its root and build-logic/settings.gradle.kts, so it carries an isLogic check to label the log line. MQTTastic has no build-logic included build, so that branch would be dead code here — dropped it and personalized the log to MQTTastic Build: ....

Verification

  • ./gradlew help evaluates settings cleanly (exit 0), confirming the top-level buildCache {} block resolves against the Settings object.
  • With GRADLE_CACHE_URL set, the remote-cache branch evaluates without error and logs MQTTastic Build: Remote cache URL found.
  • None of the three files are in spotless's scope, so no formatting/license-header impact.

Note: org.gradle.caching=true is already set in gradle.properties, so local caching is live now and remote activates once GRADLE_CACHE_URL is provided.

🤖 Generated with Claude Code

Adopt meshtastic-android's build cache structure: move the cache config
out of develocity.settings.gradle into a dedicated build-cache.settings.gradle.

- Use the standard top-level buildCache {} API instead of develocity {
  buildCache {} }, decoupling caching from the Develocity plugin.
- Use logger.lifecycle instead of println for the cache-found message.
- develocity.settings.gradle now only configures build scans.
- Wire both scripts into settings.gradle.kts.

Remote cache stays disabled until GRADLE_CACHE_URL is provided; push is
gated on credentials so fork PRs never attempt writes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jamesarich jamesarich enabled auto-merge June 13, 2026 17:54
@jamesarich jamesarich disabled auto-merge June 13, 2026 18:46
@jamesarich jamesarich merged commit d373c70 into main Jun 13, 2026
12 checks passed
@jamesarich jamesarich deleted the claude/trusting-leakey-626f88 branch June 13, 2026 18:46
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