Repository navigation
ci: onboard to the OSS Community Develocity instance - #118
Conversation
Replaces the self-hosted HttpBuildCache with Develocity's remote cache at community.develocity.cloud under project `meshtastic`, matching the Meshtastic-Android onboarding (meshtastic/Meshtastic-Android#6531). - `gradle/develocity.settings.gradle` replaces `gradle/build-cache.settings.gradle`, applied from BOTH settings files: the build-logic included build does not inherit the root's configuration, and without its own it silently drops to local-cache-only and publishes no scan. - `.github/actions/gradle-setup` gains an optional `develocity_access_key` input, passed at all 12 call sites; the GRADLE_CACHE_* env blocks are gone. - Scans publish only from authenticated builds, so fork PRs and developers without a provisioned key are unaffected; only authenticated CI runs write to the cache. The GRADLE_CACHE_* secrets are no longer read but are deliberately left in place as the rollback path.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe project replaces its previous Gradle cache setup with Develocity configuration. The reusable Gradle action and CI workflows now pass ChangesDevelocity build integration
Estimated code review effort: 3 (Moderate) | ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@gradle/develocity.settings.gradle`:
- Around line 62-72: Update the remote build-cache push condition in buildCache
to require an explicit trusted-writer signal in addition to CI and a non-empty
accessKey, rather than treating all CI jobs as writers. Define and pass that
signal only from protected-branch and release workflow jobs, while pull-request
jobs remain read-only.
In `@settings.gradle.kts`:
- Around line 12-13: Move the Develocity and common custom user data plugin
versions into the root gradle/libs.versions.toml [versions] and [plugins]
sections, then update settings.gradle.kts and build-logic/settings.gradle.kts to
reference those catalog plugin aliases via version.ref instead of hardcoded
versions. Ensure build-logic continues reusing the root version catalog; apply
the same catalog-based change at settings.gradle.kts lines 12-13 and
build-logic/settings.gradle.kts lines 23-24.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4d5f02dd-bebb-4d38-87ae-f714b6e9942a
📒 Files selected for processing (9)
.github/actions/gradle-setup/action.yml.github/workflows/ci.yml.github/workflows/docs.yml.github/workflows/release.ymlREADME.mdbuild-logic/settings.gradle.ktsgradle/build-cache.settings.gradlegradle/develocity.settings.gradlesettings.gradle.kts
💤 Files with no reviewable changes (1)
- gradle/build-cache.settings.gradle
Same-repository pull requests DO receive repository secrets, so gating cache
writes on the presence of DEVELOCITY_ACCESS_KEY alone let a PR build write
entries into the shared cache. The self-hosted HttpBuildCache this replaced
gated on GITHUB_EVENT_NAME and excluded pull_request; that protection was lost
in the port and is restored here.
Verified against a real CI-shaped environment:
CI=true GITHUB_EVENT_NAME=pull_request -> pull-only
CI=true GITHUB_EVENT_NAME=push -> writes enabled
CI=true GITHUB_EVENT_NAME=merge_group -> writes enabled
Local builds are still excluded by isCI, and fork PRs have no key at all.
Publishes Build Scans® and moves the remote build cache to the OSS Community
Develocity instance at https://community.develocity.cloud under project ID
meshtastic, matching the Meshtastic-Android onboarding(meshtastic/Meshtastic-Android#6531) and the kzstd / gradle-flatpak-sources
rollout (meshtastic/kzstd#36, meshtastic/gradle-flatpak-sources#28).
What changed
gradle/develocity.settings.gradlereplacesgradle/build-cache.settings.gradle.The cache now comes from Develocity, so scan and cache configuration are one
concern in one file.
settings.gradle.ktsandbuild-logic/settings.gradle.kts. An included build does not inherit theroot's settings configuration — without its own it silently drops to
local-cache-only and publishes no scan. (
build-logicpreviously had nocache configuration at all.)
HttpBuildCacheis replaced byremote(develocity.buildCache)..github/actions/gradle-setupgains an optionaldevelocity_access_keyinput forwarded to
setup-gradle; all 12 call sites acrossci.yml(9),release.yml(2) anddocs.yml(1) passsecrets.DEVELOCITY_ACCESS_KEY.The
GRADLE_CACHE_URL/GRADLE_CACHE_USERNAME/GRADLE_CACHE_PASSWORDenv blocks are removed from all three workflows.
Behaviour
publishing.onlyIf { it.authenticated }).Fork PRs and developers without a provisioned key publish nothing rather than
failing.
cannot poison it. CI disables the local cache — runners are ephemeral and
every hit comes from the remote anyway.
external process names are obfuscated to constants.
Verification
meshtasticfor both the root build(
MQTTastic-Client-KMP) and the included build (build-logic, verified with./gradlew -p build-logic help).spotlessCheck detektAll apiCheckgreen;jvmTest,wasmJsTestandlinuxX64Testeach green.On the kzstd pilot this configuration measured a 59% build-time avoidance
ratio on the second CI run, entirely from remote cache hits.
Unrelated pre-existing issue found while verifying
./gradlew allTestscrashes the Gradle daemon with a JVMSIGSEGVinside G1'swrite barrier (
G1BarrierSet::AccessBarrier::oop_access_barrier) on JDK21.0.12, with plenty of free memory. This reproduces on a clean
maincheckout, so it is not caused by this PR. Individual test targets all pass;
only the aggregate task dies, which suggests the repo's
-Xmx2048Magainstmany concurrent test JVMs. Worth a separate issue.
Note for reviewers
The
GRADLE_CACHE_*repository secrets are now unused but deliberately notdeleted — they are the rollback path.
Summary by CodeRabbit