Include version catalog file in filehash in the Gradle cache key
See original GitHub issueDescription:
Add libs.versions.toml
or *.versions.toml
to the cache key for Gradle dependency caching.
Justification:
Central declaration of dependencies is an incubating Gradle feature that supports centralisation of configuration of dependencies & versions. By convention this is done in a file named libs.versions.toml
: https://docs.gradle.org/7.2/userguide/platforms.html#sub:conventional-dependencies-toml
Projects that start using this feature can’t practically use the Gradle caching feature in setup-java because the cache key will not change in most cases when dependencies are updated in the TOML file.
Are you willing to submit a PR?
Yes - if this change is acceptable. Edit: no, as I will be using gradle/gradle-build-action@v2 instead which I discovered after raising this issue.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
We’ll prepare a pull request later. We keep the issue opened until the pull request is merged. Thank you for the response and suggestion @3flex.
Sorry, I won’t be working on a PR.
On the best pattern, I’m not sure -
**/libs.versions.toml
would capture the conventional, default filename. If someone isn’t using the default filename then the file could be named anything as far as I know, so**/*.versions.toml
is probably not that useful. I’d suggest**/libs.versions.toml
to start with.