This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 472489f7590 build: solr-ui: gradle.properties fallback on template
(#4958)
472489f7590 is described below
commit 472489f7590a7dcacc3596e403164e5e44a29781
Author: David Smiley <[email protected]>
AuthorDate: Mon Sep 28 17:22:04 2026 -0400
build: solr-ui: gradle.properties fallback on template (#4958)
---
gradle/solr/solr-ui.gradle | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/gradle/solr/solr-ui.gradle b/gradle/solr/solr-ui.gradle
index e9d0a741a53..18cfdc3e19b 100644
--- a/gradle/solr/solr-ui.gradle
+++ b/gradle/solr/solr-ui.gradle
@@ -23,7 +23,15 @@ import java.security.MessageDigest
import org.gradle.tooling.GradleConnector
def uiProps = new Properties()
-file("$rootDir/gradle.properties").withInputStream { uiProps.load(it) }
+// gradle.properties is generated on demand (by gradlew) and gitignored, so it
may not exist yet,
+// e.g. when this build is evaluated as an includeBuild from a consuming
composite build. Fall back
+// to the tracked template, which carries the same real pinned defaults,
rather than forcing that
+// generation step (or a build-from-source fallback) just to read them.
+def uiPropsFile = file("$rootDir/gradle.properties")
+if (!uiPropsFile.exists()) {
+ uiPropsFile = file("$rootDir/gradle/template.gradle.properties")
+}
+uiPropsFile.withInputStream {uiProps.load(it)}
def buildFromSource = project.hasProperty('solr.ui.buildFromSource') &&
project.property('solr.ui.buildFromSource') == 'true'