question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Include version catalog file in filehash in the Gradle cache key

See original GitHub issue

Description: 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:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dmitry-shibanovcommented, Oct 14, 2021

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.

0reactions
3flexcommented, Oct 14, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration cache - Gradle User Manual
The build cache takes care of caching the outputs and intermediate files of the build, such as task outputs or artifact transform outputs....
Read more >
It is currently in use by another Gradle instance - Stack Overflow
Remove the lock files in the gradle cache by executing something like this: find ~/.gradle -type f -name "*.lock" -delete.
Read more >
Gradle Project Scan - Task 'sonarqube' not found in root ...
Yes, I do have the plugin in the build.gradle file. ... file lock for file hash cache (/home/gradle/.gradle/caches/5.4.1/fileHashes) ...
Read more >
Allow to use file checksum as cache key (#18986) - GitLab.org
I have a java project that uses gradle as a build system. In this project all dependencies are defined in a separate file....
Read more >
Gradle version catalogs for an awesome dependency ...
Managing dependencies in a single module project is pretty simple, but when you start scaling and adding modules you have different ways to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found