You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2019/05/27 19:20:12 UTC

[lucene-solr] 01/02: SOLR-13452: Small tweaks and fixes for analysis regenerate targets.

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

markrmiller pushed a commit to branch jira/SOLR-13452_gradle_2
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit a8e22bb8b6ec9fb4536852af1b155b8bb1df1540
Author: markrmiller <ma...@apache.org>
AuthorDate: Mon May 27 14:00:23 2019 -0500

    SOLR-13452: Small tweaks and fixes for analysis regenerate targets.
---
 lucene/analysis/common/build.gradle   | 21 +++++++++++----------
 lucene/analysis/kuromoji/build.gradle | 10 +++++++++-
 lucene/analysis/nori/build.gradle     |  8 ++++++++
 3 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/lucene/analysis/common/build.gradle b/lucene/analysis/common/build.gradle
index 85263eb..1b2543d 100644
--- a/lucene/analysis/common/build.gradle
+++ b/lucene/analysis/common/build.gradle
@@ -45,10 +45,9 @@ ratSources {
   excludes = ['**/*.aff', '**/*.dic', '**/*.txt', '**/charfilter/*.htm*', '**/*LuceneResourcesWikiPage.html']
 }
 
-task regenerate {
-  doFirst {
-    println "--> regenerate"
-  }
+task fixCRLFUnicodeData(type: org.apache.lucene.gradle.FixCRLF) {
+  file = new File("${projectDir}" + unicodePropsJavaFile)
+  encoding = "UTF-8"
 }
 
 task unicodeData(type: org.apache.lucene.gradle.GenerateUnicodeData) {
@@ -60,14 +59,16 @@ task unicodeData(type: org.apache.lucene.gradle.GenerateUnicodeData) {
   }
   
   unicodePropsFile = new File("${projectDir}" + unicodePropsJavaFile)
+  
+  finalizedBy fixCRLFUnicodeData
 }
 
-task fixCRLFUnicodeData(type: org.apache.lucene.gradle.FixCRLF) {
-  file = new File("${projectDir}" + unicodePropsJavaFile)
-  encoding = "UTF-8"
+task regenerate {
+  doFirst {
+    println "--> regenerate"
+  }
+  
+  dependsOn unicodeData
 }
 
-unicodeData.finalizedBy fixCRLFUnicodeData
-
-regenerate.dependsOn unicodeData
 
diff --git a/lucene/analysis/kuromoji/build.gradle b/lucene/analysis/kuromoji/build.gradle
index db40200..d11d5eb 100644
--- a/lucene/analysis/kuromoji/build.gradle
+++ b/lucene/analysis/kuromoji/build.gradle
@@ -68,7 +68,7 @@ task patchDict {
 }
 
 task buildDict(type: JavaExec) {
-  group = 'Build'
+  group = 'Build Regenerate'
   description = "Download, patch, and build dict for kuromoji."
   
   doFirst {
@@ -92,6 +92,14 @@ task buildDict(type: JavaExec) {
   dependsOn patchDict
 }
 
+task regenerate {
+  doFirst {
+    println "--> regenerate"
+  }
+  
+  dependsOn buildDict
+}
+
 forbiddenApisTools {
   bundledSignatures -= 'jdk-system-out'
   exclude 'org/apache/lucene/**' // exclude until converted to NIO2
diff --git a/lucene/analysis/nori/build.gradle b/lucene/analysis/nori/build.gradle
index 23291b4..90c6e5c 100644
--- a/lucene/analysis/nori/build.gradle
+++ b/lucene/analysis/nori/build.gradle
@@ -83,3 +83,11 @@ task buildDict(type: JavaExec) {
   
   dependsOn downloadDict
 }
+
+task regenerate {
+  doFirst {
+    println "--> regenerate"
+  }
+  
+  dependsOn buildDict
+}