Apache Solr open-source search software
build: solr-ui: gradle.properties fallback on template (#4958)
David Smiley472489f7590a
diff --git a/gradle/solr/solr-ui.gradle b/gradle/solr/solr-ui.gradleindex e9d0a741a53..18cfdc3e19b 100644--- a/gradle/solr/solr-ui.gradle+++ b/gradle/solr/solr-ui.gradle@@ -23,7 +23,15 @@ import java.security.MessageDigestimport org.gradle.tooling.GradleConnectordef 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'