diktat
diktat copied to clipboard
diktat-gradle-plugin is not compatible with Gradle Configuration Cache
It would be nice to have Gradle Configuration Cache Support in diktat-gradle-plugin.
Now I get this error when running the :diktatCheck
task wih Gradle Configuration Cache enabled:
2 problems were found storing the configuration cache, 1 of which seems unique.
- Task `:diktatCheck` of type `org.cqfn.diktat.plugin.gradle.DiktatJavaExecTaskBase`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/8.3/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
Diktat version: 1.2.5
hi @illarionov, we will look into it in scope of diktat 2.0
For the time being, it is possible to add:
tasks.named("diktatFix") {
notCompatibleWithConfigurationCache("https://github.com/saveourtool/diktat/issues/1732")
}
to your build.gradle. Which obviously doesn't provide support for configuration cache. But at least, allows gradle to run it
@nulls maybe you should consider this adding this as workaround for people with configuration cache enabled. As it stops from using diktat in some configurations. For example, in mine, I run formatter on every build
For the time being, it is possible to add:
tasks.named("diktatFix") { notCompatibleWithConfigurationCache("https://github.com/saveourtool/diktat/issues/1732") }
to your build.gradle. Which obviously doesn't provide support for configuration cache. But at least, allows gradle to run it
@nulls maybe you should consider this adding this as workaround for people with configuration cache enabled. As it stops from using diktat in some configurations. For example, in mine, I run formatter on every build
@ForsHant thanks for a tip. Will add it to README.md