refactor(build): Centralize Develocity and build cache configuration#4382
Merged
Conversation
The Develocity and build cache settings have been extracted from the root `settings.gradle.kts` into a shared `gradle/develocity.settings.gradle` file. This new file is now applied in both the root project and the `build-logic` composite build. This change centralizes the build cache logic, allowing both the main build and the build logic to share the same remote cache configuration. The property lookup for cache credentials has also been improved. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
886ab57 to
3cc1312
Compare
This change updates the GitHub Actions workflows and Develocity configuration to support authenticated access to the Gradle remote build cache. The reusable workflows (`reusable-lint`, `reusable-android-build`, `reusable-android-test`, and `release`) are updated to accept `GRADLE_CACHE_USERNAME` and `GRADLE_CACHE_PASSWORD` secrets. The `develocity.settings.gradle` file is modified to only enable `push` to the remote cache if both username and password credentials are provided. This prevents "403 Forbidden" errors in CI environments that have read-only access to the cache. Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4382 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 3 3
Lines 28 28
Branches 8 8
=====================================
Misses 28 28 ☔ View full report in Codecov by Sentry. |
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.
The Develocity and build cache settings have been extracted from the root
settings.gradle.ktsinto a sharedgradle/develocity.settings.gradlefile. This new file is now applied in both the root project and thebuild-logiccomposite build.This change centralizes the build cache logic, allowing both the main build and the build logic to share the same remote cache configuration. The property lookup for cache credentials has also been improved.