Open nedtwigg opened 2 years ago
Initially, both the vscode and intelliJ plugins fixed this by adding --no-configuration-cache
to their command lines:
org.gradle.unsafe.configuration-cache=true
in a gradle.properties
somewhereUnfortunately, for Gradle < 6.6, this flag is unrecognized and throws an exception
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.
Yes, #1274 will fix this.
With 7.0.0.BETA2 I get following error (running spotlessIdeHook with configuration cache enabled):
spotlessApply` of type `org.gradle.api.DefaultTask`: cannot serialize object of type 'com.diffplug.gradle.spotless.SpotlessTaskImpl', a subtype of 'org.gradle.api.Task', as these are not supported with the 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 usingspotlessIdeHook
.