spotlessIdeHook and configuration cache
The spotless IDE hook is incompatible with the configuration cache, see https://github.com/ragurney/spotless-intellij-gradle/issues/18 for an example and stacktrace. Workaround for now is to specify --no-configuration-cache when using spotlessIdeHook.
Initially, both the vscode and intelliJ plugins fixed this by adding --no-configuration-cache to their command lines:
- this is only needed if the user has enabled configuration cache with
org.gradle.unsafe.configuration-cache=truein agradle.propertiessomewhere - if the user has not enabled that flag there is no effect
Unfortunately, for Gradle < 6.6, this flag is unrecognized and throws an exception
- https://github.com/badsyntax/vscode-spotless-gradle/issues/281
The VSCode plugin is trying to fix this by parsing and detecting the version, another way is to test it on first run, detect the error, then try again without that flag.
Would #1274 resolve this issue, if the configuration cache is natively supported and the current workaround with JvmLocalCache is removed?
We have several large projects which require a few minutes in the configuration phase. A fast IDE hook which makes use of the cache and doesn't invalidate it would be nice.