Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to Using Gradle Wrapper Exclusively (#3803)
## What was the problem? The workflow used `gradle/actions/setup-gradle@v3` to manage the Gradle version, which was redundant since the project already uses the Gradle Wrapper (`./gradlew`). This redundancy created the potential for version conflicts if `setup-gradle` and the Gradle Wrapper specified different versions. Additionally, setting the Ubuntu version in the workflow worked temporarily but failed after Ubuntu 20.04.6 upgraded to Gradle 8.11 ([GitHub Actions update](actions/runner-images#10999)) 😅. It's also impossible to pin to the correct minor version in GH workflows (20.04.05). --- ## How does this fix it? - Removed `gradle/actions/setup-gradle@v3` to ensure the Gradle Wrapper exclusively manages the Gradle version. - The Gradle version specified in `gradle-wrapper.properties` (8.10.2) is always used, ensuring consistency and avoiding version mismatches. - Simplified workflow by eliminating unnecessary cache settings (`cache-read-only`, `gradle-home-cache-cleanup`). - Added a step to clear Gradle caches (`rm -rf ~/.gradle || true`) to prevent residual or mismatched Gradle versions from interfering with the build process. This approach aligns the workflow with best practices by relying on the Gradle Wrapper for version management and ensures the workflow remains functional despite changes to the Ubuntu image. --- ## How to test this PR 1. Verify that the workflow executes successfully in CI pipelines. 2. Confirm that Gradle 8.10.2 (as defined in `gradle-wrapper.properties`) is used during all builds. Note: running `abd-vro-internal`, this change seems to work! https://github.com/department-of-veterans-affairs/abd-vro-internal/actions/runs/12022537477/job/33514927530#step:13:2 ![image](https://github.com/user-attachments/assets/78d83c1e-2ac4-4b9d-8978-20e6b1a14a62) ![image](https://github.com/user-attachments/assets/e3d48842-be7e-4431-a48e-38eedd3bbc54)
- Loading branch information