-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Gradle configuration cache #97
Comments
Interim solution?
https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:task_opt_out |
Hi, I see in the first snippet that you're using the version 2.8.2? Is that possible to try with version 3.1.0. As for the cache configuration issue, I don't know how the call to the external command ( What do you think? |
$ mkdir /tmp/test && cd "$_"
$ gradle init --type java-library --java-version 21 --project-name test --dsl groovy --test-framework junit-jupiter --no-comments --no-incubating --quiet
$ perl -i -l -p -e "print \" id 'net.nemerosa.versioning' version '3.1.0'\" if $. == 4" lib/build.gradle
$ printf '\nversioning {}\nversion = versioning.info.full\n' >> lib/build.gradle
$ git init --quiet
$ git add -A
$ git commit --quiet -m "initial"
$ ./gradlew --configuration-cache --quiet clean
FAILURE: Build failed with an exception.
* Where:
Build file '/private/tmp/test/lib/build.gradle' line: 32
* What went wrong:
Configuration cache problems found in this build.
2 problems were found storing the configuration cache.
- Build file 'lib/build.gradle': external process started '/usr/local/bin/git --version'
See https://docs.gradle.org/8.7/userguide/configuration_cache.html#config_cache:requirements:external_processes
- Build file 'lib/build.gradle': external process started '/usr/local/bin/git config --system --show-origin --list -z'
See https://docs.gradle.org/8.7/userguide/configuration_cache.html#config_cache:requirements:external_processes
See the complete report at file:///private/tmp/test/build/reports/configuration-cache/2cvh062oate61b7yhx8pzmmbf/ebyxie6m7vpbm2q7bw5v4bf88/configuration-cache-report.html
> Starting an external process '/usr/local/bin/git --version' during configuration time is unsupported.
> Starting an external process '/usr/local/bin/git config --system --show-origin --list -z' during configuration time is unsupported.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 5s |
The example provided by the Gradle team wraps the def gitVersion = providers.exec {
commandLine("git", "--version")
}.standardOutput.asText.get() Maybe calls to There is Gradle Roadmap item this issue might be added to ... |
https://blog.gradle.org/road-to-gradle-9#configuration-cache-improvements
|
Here is what another project using Grgit did: |
I was able to work around this by wrapping my calls to
|
configuration-cache-report.html
at net.nemerosa.versioning.git.GitInfoService.getInfo(GitInfoService.groovy:37) at net.nemerosa.versioning.SCMInfoService$getInfo.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:148)(3 internal lines hidden) at net.nemerosa.versioning.VersioningExtension.computeInfo(VersioningExtension.groovy:195) at net.nemerosa.versioning.VersioningExtension.getInfo(VersioningExtension.groovy:182) at net.nemerosa.versioning.VersioningExtension_Decorated.getInfo(Unknown Source)
https://docs.gradle.org/8.7/userguide/configuration_cache.html#config_cache:requirements:external_processes
The text was updated successfully, but these errors were encountered: