You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ds...@apache.org on 2026/09/30 19:13:21 UTC
(solr) 03/04: build: solr-ui: gradle.properties fallback on template (#4958)
This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git
commit 10e2e8b72e3c310914d1e208b82bc54bf92c2d03
Author: David Smiley <ds...@apache.org>
AuthorDate: Mon Sep 28 17:22:04 2026 -0400
build: solr-ui: gradle.properties fallback on template (#4958)
(cherry picked from commit 472489f7590a7dcacc3596e403164e5e44a29781)
---
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'