Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added caching to Gradle steps in GitHub Actions #632

Closed
wants to merge 1 commit into from
Closed

Added caching to Gradle steps in GitHub Actions #632

wants to merge 1 commit into from

Conversation

Mithrandir21
Copy link

What kind of change does this PR introduce?

Feature: This PR will add a caching and caching retrieval step to all GitHub Actions steps that involve Gradle.
Caches will make builds faster by not requiring Gradle to download and configure all dependencies for each build.
The cache 'hit' and 'miss' logic is robust and should work well across builds.

What is the current behavior?

No caching is currently implemented in the GitHub Actions steps where Gradle is involved.

What is the new behavior?

Caches will automatically be created in the GitHub Actions 'caches' section, that will be attempted reused during builds.

Additional context

Link to GitHub Actions repo:
Gradle-cache-action

Additionally, there are a lot of settings that can be configurated if and when needed.

@jan-tennert
Copy link
Collaborator

Hey, thank you for this PR! We already have Gradle Caching via the setup-gradle plugin:
image

- name: Setup Gradle
uses: gradle/actions/[email protected]
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
cache-read-only: false

Currently, the master branch writes to the cache and all PRs and other branches read from the cache.
If you have any suggestions or improvements regarding the current approach, feel free to leave your feedback!

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.

2 participants