You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "dweiss (via GitHub)" <gi...@apache.org> on 2023/02/01 11:32:01 UTC

[GitHub] [solr] dweiss commented on a diff in pull request #1320: SOLR-16641 - Generate gradle.properties from gradlew

dweiss commented on code in PR #1320:
URL: https://github.com/apache/solr/pull/1320#discussion_r1093100197


##########
gradlew:
##########
@@ -163,10 +163,18 @@ fi
 
 CLASSPATH=$GRADLE_WRAPPER_JAR
 
-# Don't fork a daemon mode on initial run that generates local defaults.
-GRADLE_DAEMON_CTRL=
+# Generate gradle.properties if they don't exist
 if [ ! -e "$APP_HOME/gradle.properties" ]; then
-    GRADLE_DAEMON_CTRL=--no-daemon
+    echo "Populating gradle.properties from gradle.properties.template."
+    # Do the copy first. If the next steps fail, the gradle.properties will still be usable
+    cp gradle.properties.template gradle.properties
+    NUM_CORES=$(grep ^cpu\\scores /proc/cpuinfo | uniq |  awk '{print $4}')

Review Comment:
   Honestly, and speaking also as a Windows user, I don't see how putting all this logic into gradlew makes it a better solution. I preferred one code that generated those defaults - it could still be externalized and pattern-replaced but it'd at least work for everyone the same way.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org