Closed gotson closed 11 months ago
The gradle-build-action
will save and restore content in the Gradle User Home directory. When you run a jar
task the output is saved in the Project build
directory, and so won't be saved by this action.
However, the Gradle Local Build Cache is stored in the Gradle User Home, and so will be saved and restored by this action. All .class
files and other expensive outputs are saved in the build cache (assuming it's enabled). Note that the actual jar
file outputs are not saved in the build cache, since these are normally inexpensive to recreate from the underlying .class
files.
So while you could theoretically save the build
directory using actions/cache
, I think you're better off enabling the Gradle Build Cache and leveraging the built-in support of this action.
Hello,
i have a question regarding the best practice to split a large CI job that is composed of multiple executions of
gradle-build-action
, or of steps that effectively depend on the artifacts generated by Gradle.Would
gradle-build-action
cache the jar produced by thejar
task for instance ?If not, could i cache it myself by tweaking the
gradle-build-action
configuration, or by usingactions/cache
? And if I were to do so by usingactions/cache
, would subsequent executions ofgradle-build-action
in a different workflow/job consider the restored cache as enough not to trigger the dependent tasks again ?