refactor(build): split build cache into its own settings script#58
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adopt meshtastic-android's build cache implementation by moving the cache config out of
develocity.settings.gradleinto a dedicatedgradle/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
gradle/build-cache.settings.gradle— uses the standard top-levelbuildCache {}API (instead ofdevelocity { buildCache {} }); keeps thegetMeshPropertyenv →local.properties→config.propertieswalk-up and the fork-safepushgating; useslogger.lifecycleinstead ofprintln.gradle/develocity.settings.gradle— stripped thebuildCache {}block and the now-unusedgetMeshPropertyhelper; now only configuresdevelocity { 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 anisLogiccheck to label the log line. MQTTastic has nobuild-logicincluded build, so that branch would be dead code here — dropped it and personalized the log toMQTTastic Build: ....Verification
./gradlew helpevaluates settings cleanly (exit 0), confirming the top-levelbuildCache {}block resolves against theSettingsobject.GRADLE_CACHE_URLset, the remote-cache branch evaluates without error and logsMQTTastic Build: Remote cache URL found.Note:
org.gradle.caching=trueis already set ingradle.properties, so local caching is live now and remote activates onceGRADLE_CACHE_URLis provided.🤖 Generated with Claude Code