Slackbot
02/02/2022, 6:10 PMAnze Sodja
02/02/2022, 6:33 PM.gradle
) to some cache if Cloud build offers it. I saw some solutions that use Cloud Storage for caching that should be relatively fast on gcloud. It could also help with dependency caching. Something similar to that maybe: https://ryanharter.com/blog/2019/02/cloud-build-recipes-saving-the-build-cache/David Smith
02/02/2022, 6:38 PMAnze Sodja
02/02/2022, 6:43 PMDavid Smith
02/02/2022, 6:44 PMEli Graber
02/02/2022, 6:46 PM.gradle
?Anze Sodja
02/02/2022, 6:46 PMAnze Sodja
02/02/2022, 6:53 PMI’ve been caching `~/.gradle/caches`for my CI builds. Should I also be caching the project’sIt might help in some cases yes (I think for configuration cache). If you want to see what to cache, I think checking the code of github-build-action is the best way. Since one of Gradle guys implemented it (I am not an expert here).?.gradle
Anze Sodja
02/02/2022, 7:00 PM.gradle/configuration-cache
from project .gradle
folder in ConfigurationCacheEntryExtractor
.David Smith
02/02/2022, 7:53 PMgradle clean
and this took 1m44s which seems like a really long timeDavid Smith
02/02/2022, 7:55 PMDavid Smith
02/02/2022, 8:11 PMgradle --debug help
which takes around 1s on my laptop and on the CI machine using the official gradle image it takes 27s. There’s something really wrong there, no?Anze Sodja
02/02/2022, 9:51 PMgradle-api
and some some other things even if you use docker image with gradle installed. If you see something like in debug logs, it means it created gradle-api jars:
[2022-01-13 08:50:52] Generating /root/.gradle/caches/7.3.3/generated-gradle-jars/gradle-api-7.3.3.jar
You would have to cache also that in Docker image, since image you used doesn’t do that step.
You can also try to run docker image with gradle installed locally and see the difference.no
02/03/2022, 9:18 AMDavid Smith
02/03/2022, 9:59 AM