Ohhh, I really like this, especially given the amount of time I’ve spent 
looking at all of the possible tasks….

Instead of a help.txt file though, how about some help task? ./gradlew helpAnt? 

But I need a sanity check here before pushing this (assuming y’all agree) 
before I go changing some things:

“./gradlew tests” (note the plural) fails with:
java.io.FileNotFoundException: 
/Users/Erick/apache/solrVersions/solr-gradle_8/buildSrc/common/help-text/testHelp.txt
 (No such file or directory)

And, indeed, there is no such file. However, there is a file:
/Users/Erick/apache/solrVersions/solr-gradle_8/help/help-text/testHelp.txt

So if I change the file: ../solr_gradle_8/help/build.gradle (the “tests” task)
from:
println file("${rootDir}/buildSrc/common/help-text/testHelp.txt").text
to
println file("${rootDir}/help/help-text/testHelp.txt").text

it works just fine. Does this seem consistent with the structure of the Gradle 
build? I don’t want to blunder about with things like this without checking 
what others think until I get a better feel for how this all should work.

A couple of other things:

1> I detest a “test” and “tests” tasks having wildly different outcomes, so I 
changed all the tasks in "../solr_gradle_8/help/build.gradle” to have a “help” 
prefix. helpTest, helpAnt, helpBuild (and, BTW, I really like that tasks aren’t 
case-sensitive).

2> I added a new file "../solr_gradle_8/help/help-text/antHelp.txt” to be the 
printout of a new task “helpAnt” that has Dawid’s suggestions in it.


And there’s an empty file: .../solr-gradle_8/buildSrc/common/build-help.gradle. 
It’s unclear to me what the intention is here, but from what I can see it’s a 
stub for building 

Here’s the diff, FYI. If this looks like it doesn’t do violence to the 
structure of the gradle build I’ll check it in.

diff --git a/help/build.gradle b/help/build.gradle
index 2918118ab93..5504cdf679e 100644
--- a/help/build.gradle
+++ b/help/build.gradle
@@ -22,15 +22,25 @@ sourceSets {
   }
 }
 
-task tests {
+task helpTest {
   group = 'Help (Build Documentation)'
   description = "How to run Lucene and Solr tests and the options that are 
available to you."
 
   doLast {
-    println file("${rootDir}/buildSrc/common/help-text/testHelp.txt").text
+    println file("${rootDir}/help/help-text/testHelp.txt").text
   }
 }
 
+task helpAnt {
+  group = 'Help (Build Documentation)'
+  description = "Ant equivalences in the Gradle build."
+
+  doLast {
+    println file("${rootDir}/help/help-text/antHelp.txt").text
+  }
+}
+
+
 task deps {
   group = 'Help (Build Documentation)'
   description = "How dependencies are managed and what you need to know to 
change them."
@@ -39,7 +49,7 @@ task deps {
   }
 }
 
-task testBuild {
+task helpBuild {
   group = 'Help (Build Documentation)'
   description = "Information on using Docker to test that your build changes 
are not too disruptive."
 }






> On Nov 15, 2019, at 4:30 AM, Dawid Weiss <dawid.we...@gmail.com> wrote:
> 
> ant compile => gradlew compileJava
> ant jar => gradlew package
> ant clean  => gradlew clean
> ant clean-jars => [no replacement - JARs sourced directly from gradle caches]
> ant jar-checksums => gradlew jarChecksums
> ant test => gradlew test [or better (includes any other verification
> tasks): gradlew check]
> ant validate => gradlew check
> ant precommit => TODO


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to