You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2020/02/17 12:37:10 UTC

[lucene-solr] branch jira/LUCENE-9220 updated: LUCENE-9220: remove confusingly-named gradle task and replace with a doFirst

This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch jira/LUCENE-9220
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/jira/LUCENE-9220 by this push:
     new 9f43c5a  LUCENE-9220: remove confusingly-named gradle task and replace with a doFirst
9f43c5a is described below

commit 9f43c5a3322feb2a6391da83c5ad34e2b4fa2a03
Author: Robert Muir <rm...@apache.org>
AuthorDate: Mon Feb 17 07:37:09 2020 -0500

    LUCENE-9220: remove confusingly-named gradle task and replace with a doFirst
---
 gradle/generation/snowball.gradle | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/gradle/generation/snowball.gradle b/gradle/generation/snowball.gradle
index a6f5e88..7c423b2 100644
--- a/gradle/generation/snowball.gradle
+++ b/gradle/generation/snowball.gradle
@@ -35,6 +35,7 @@ configure(project(":lucene:analysis:common")) {
     snowballDataDir    = file("${snowballWorkDir}/data")
   }
 
+  // downloads snowball stemmers (or use cached copy)
   task downloadSnowballStemmers(type: Download) {
     def stemmerZip = file("${snowballWorkDir}/stemmers.zip")
 
@@ -51,6 +52,7 @@ configure(project(":lucene:analysis:common")) {
     }
   }
 
+  // downloads snowball website (or use cached copy)
   task downloadSnowballWebsite(type: Download) {
     def websiteZip = file("${snowballWorkDir}/website.zip")
 
@@ -67,6 +69,7 @@ configure(project(":lucene:analysis:common")) {
     }
   }
 
+  // downloads snowball test data (or use cached copy)
   task downloadSnowballData(type: Download) {
     def dataZip = file("${snowballWorkDir}/data.zip")
 
@@ -83,24 +86,25 @@ configure(project(":lucene:analysis:common")) {
     }
   }
 
-  task cleanSnowballCheckout(type: Delete) {
-    dependsOn downloadSnowballStemmers
-    delete snowballPatchedDir
-  }
-
+  // makes a clean copy of snowball stemmers source and applies lucene patch to it.
   task patchSnowball(type: Copy) {
-    dependsOn cleanSnowballCheckout
+    dependsOn downloadSnowballStemmers
 
     from fileTree(snowballStemmerDir) {
       include '**/*'
     }
     into snowballPatchedDir
 
+    doFirst {
+      delete snowballPatchedDir
+    }
+
     doLast {
       ant.patch(patchfile: rootProject.file("gradle/generation/snowball.patch"), dir: snowballPatchedDir, strip: "1")
     }
   }
 
+  // runs shell script to regenerate stemmers, base stemming subclasses, test data, and stopwords.
   task snowballGen() {
     dependsOn patchSnowball
     dependsOn downloadSnowballWebsite