nebula-plugins / gradle-dependency-lock-plugin

A plugin to allow people using dynamic dependency versions to lock them to specific versions.
Apache License 2.0
293 stars 43 forks source link

Build fails with configuration cache #268

Open pkubowicz opened 6 months ago

pkubowicz commented 6 months ago

Execute gradle --configuration-cache generateLock:

> Task :generateLock FAILED

397 problems were found storing the configuration cache, 3 of which seem unique.
- Task `:generateLock` of type `nebula.plugin.dependencylock.tasks.GenerateLockTask`: execution of task ':generateLock' caused invocation of 'Task.convention' in other task at execution time which is unsupported.
  See https://docs.gradle.org/8.7/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:generateLock` of type `nebula.plugin.dependencylock.tasks.GenerateLockTask`: execution of task ':generateLock' caused invocation of 'Task.project' in other task at execution time which is unsupported.
  See https://docs.gradle.org/8.7/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
- Task `:generateLock` of type `nebula.plugin.dependencylock.tasks.GenerateLockTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/8.7/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

I have configuration cache enabled in ~/.gradle/gradle.properties, so I am not able to use this task at all. I use the following workaround:

tasks.named("generateLock") {
    notCompatibleWithConfigurationCache("")
}