You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ct...@apache.org on 2021/01/15 21:45:27 UTC
[lucene-solr] 16/38: Make :localSettings always available,
even if it's a noop on subsequent runs. (#2190)
This is an automated email from the ASF dual-hosted git repository.
ctargett pushed a commit to branch jira/solr-13105-toMerge
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit 6f26bd2d08a93896712dbca22157ccfe69792dfd
Author: Dawid Weiss <da...@carrotsearch.com>
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 ->