From 2e16af4336faff4e5f21b6f05600c5d00b573d3f Mon Sep 17 00:00:00 2001 From: Roberto Perez Alcolea Date: Mon, 16 Mar 2026 13:34:18 -0700 Subject: [PATCH 1/2] Replace project.provider with injected ProviderFactory for configuration cache compatibility --- .../plugin/clojuresque/ClojureBasePlugin.groovy | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/groovy/nebula/plugin/clojuresque/ClojureBasePlugin.groovy b/src/main/groovy/nebula/plugin/clojuresque/ClojureBasePlugin.groovy index d7a088e..adfefde 100644 --- a/src/main/groovy/nebula/plugin/clojuresque/ClojureBasePlugin.groovy +++ b/src/main/groovy/nebula/plugin/clojuresque/ClojureBasePlugin.groovy @@ -23,6 +23,7 @@ import org.gradle.api.model.ObjectFactory import org.gradle.api.plugins.JavaBasePlugin import org.gradle.api.plugins.JavaPlugin import org.gradle.api.plugins.JavaPluginExtension +import org.gradle.api.provider.ProviderFactory import org.gradle.api.tasks.SourceSet import org.gradle.api.tasks.TaskProvider @@ -32,10 +33,12 @@ class ClojureBasePlugin implements Plugin { static final String CLOJURE_GROUP = "clojure development" private final ObjectFactory objectFactory + private final ProviderFactory providerFactory @Inject - ClojureBasePlugin(ObjectFactory objectFactory) { + ClojureBasePlugin(ObjectFactory objectFactory, ProviderFactory providerFactory) { this.objectFactory = objectFactory + this.providerFactory = providerFactory } void apply(Project project) { @@ -107,8 +110,10 @@ class ClojureBasePlugin implements Plugin { set.compileClasspath ) projectName.set(project.name) - projectDescription.set(project.provider { project.description ?: "" }) - projectVersion.set(project.provider { project.version?.toString() ?: "" }) + def desc = project.description + def ver = project.version + projectDescription.set(providerFactory.provider { desc ?: "" }) + projectVersion.set(providerFactory.provider { ver?.toString() ?: "" }) projectDirectory.set(project.layout.projectDirectory) description = "Generate documentation for the Clojure source." group = JavaBasePlugin.DOCUMENTATION_GROUP From 84bed8f2ecc663cadf111701e08e4d3c43bb6a41 Mon Sep 17 00:00:00 2001 From: Roberto Perez Alcolea Date: Mon, 16 Mar 2026 13:49:43 -0700 Subject: [PATCH 2/2] Replace lazy project.provider with eager value resolution to avoid capturing Project for configuration cache compatibility --- .../plugin/clojuresque/ClojureBasePlugin.groovy | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/groovy/nebula/plugin/clojuresque/ClojureBasePlugin.groovy b/src/main/groovy/nebula/plugin/clojuresque/ClojureBasePlugin.groovy index adfefde..6b2ddb9 100644 --- a/src/main/groovy/nebula/plugin/clojuresque/ClojureBasePlugin.groovy +++ b/src/main/groovy/nebula/plugin/clojuresque/ClojureBasePlugin.groovy @@ -23,7 +23,6 @@ import org.gradle.api.model.ObjectFactory import org.gradle.api.plugins.JavaBasePlugin import org.gradle.api.plugins.JavaPlugin import org.gradle.api.plugins.JavaPluginExtension -import org.gradle.api.provider.ProviderFactory import org.gradle.api.tasks.SourceSet import org.gradle.api.tasks.TaskProvider @@ -33,12 +32,10 @@ class ClojureBasePlugin implements Plugin { static final String CLOJURE_GROUP = "clojure development" private final ObjectFactory objectFactory - private final ProviderFactory providerFactory @Inject - ClojureBasePlugin(ObjectFactory objectFactory, ProviderFactory providerFactory) { + ClojureBasePlugin(ObjectFactory objectFactory) { this.objectFactory = objectFactory - this.providerFactory = providerFactory } void apply(Project project) { @@ -110,10 +107,8 @@ class ClojureBasePlugin implements Plugin { set.compileClasspath ) projectName.set(project.name) - def desc = project.description - def ver = project.version - projectDescription.set(providerFactory.provider { desc ?: "" }) - projectVersion.set(providerFactory.provider { ver?.toString() ?: "" }) + projectDescription.set(project.description ?: "") + projectVersion.set(project.version?.toString() ?: "") projectDirectory.set(project.layout.projectDirectory) description = "Generate documentation for the Clojure source." group = JavaBasePlugin.DOCUMENTATION_GROUP