This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch branch_10_1
in repository https://gitbox.apache.org/repos/asf/solr.git

commit ab40f4862868be6cfece1a4fba32df939f87e6e2
Author: David Smiley <[email protected]>
AuthorDate: Mon Sep 28 17:22:04 2026 -0400

    build: solr-ui: gradle.properties fallback on template (#4958)
    
    (cherry picked from commit 472489f7590a7dcacc3596e403164e5e44a29781)
    (cherry picked from commit 10e2e8b72e3c310914d1e208b82bc54bf92c2d03)
---
 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'

Reply via email to