Closed sschuberth closed 4 months ago
Yes, I am aware. I'm trying to figure out how to wrap the functionality in a ValueSource to make it work
I'm trying to figure out how to wrap the functionality in a ValueSource to make it work
The code from the PR I've linked could be helpful here.
Confirmed to be fixed with release 0.12.0.
I modified the code to use two ValueSources. One for SemVersion (without SHA and commit count) and one for SemInfoVersion. I hope this will make it so that if you make a commit that does not change the version number and only access the version property that wont invalidate the configuration cache.
Since Gradle 8.1 the configuration cache is stable and can be enabled e.g. via
--configuration-cache
. Doing so with a project that uses this plugin results inSo the culprit actually is JGit, which falls back to calling the
git
CLI to find the Git system configuration. This can be worked around by setting theGIT_CONFIG_NOSYSTEM
environment variable, but this is a bit cumbersome to do from inside a Gradle build, see e.g. the solution at https://github.com/oss-review-toolkit/ort/commit/9a0c0b1546fc3bdcb299a6c7ed1c91c72c81de52.Another solution as mentioned in the commit linked above is to use a Gradle
ValueSource
. This is the approach I've implemented in the smae project as linked above later, see https://github.com/oss-review-toolkit/ort/commit/855440d83b233f9ba1fb3501c52ae7790d4efccb.@jmongard any opinion about which approach to prefer?