gradle / actions

A collection of GitHub Actions to accelerate your Gradle Builds on GitHub
https://github.com/marketplace/actions/build-with-gradle
MIT License
129 stars 28 forks source link

Multiple GRADLE_USER_HOMEs #264

Closed KlemenDEV closed 2 weeks ago

KlemenDEV commented 2 weeks ago

We have a special project where we use multiple GRADLE_USER_HOMEs.

Is there a way to configure the gradle-setup action to cache multiple GRADLE_USER_HOME folders?

bigdaz commented 2 weeks ago

This action will honor the GRADLE_USER_HOME env var if it is set prior to the setup-gradle step. But there's no way to have a single setup-gradle step that handles multiple Gradle User Home directories, and it's not supported to have multiple setup-gradle steps in the same workflow Job.

So your best option is to have multiple jobs, each one with a different GRADLE_USER_HOME directory specified. This could be done via a matrix.