This is an automated email from the ASF dual-hosted git repository. dweiss pushed a commit to branch jira/solr-13105-toMerge in repository https://gitbox.apache.org/repos/asf/solr.git
commit 6f26bd2d08a93896712dbca22157ccfe69792dfd Author: Dawid Weiss <[email protected]> AuthorDate: Fri Jan 8 20:26:35 2021 +0100 Make :localSettings always available, even if it's a noop on subsequent runs. (#2190) --- gradle/generate-defaults.gradle | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gradle/generate-defaults.gradle b/gradle/generate-defaults.gradle index fc47f80..806049f 100644 --- a/gradle/generate-defaults.gradle +++ b/gradle/generate-defaults.gradle @@ -21,12 +21,13 @@ def hasDefaults = rootProject.file("gradle.properties").exists() -// If we don't have the defaults yet, create them. - -if (!hasDefaults) { - configure(rootProject) { - task localSettings() { - doFirst { +configure(rootProject) { + task localSettings() { + doFirst { + // If we don't have the defaults yet, create them. + if (hasDefaults) { + logger.lifecycle("Local settings already exist, skipping generation.") + } else { // Approximate a common-sense default for running gradle/tests with parallel // workers: half the count of available cpus but not more than 12. def cpus = Runtime.runtime.availableProcessors() @@ -62,7 +63,9 @@ if (!hasDefaults) { } } } +} +if (!hasDefaults) { // Make all tasks depend on local setup to make sure it'll run. allprojects { tasks.all { task ->
