You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2021/11/17 17:36:39 UTC

[lucene] branch main updated: LUCENE-10240: gradle regenerate fails on java 17 (#449)

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

dweiss pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new bae095a  LUCENE-10240: gradle regenerate fails on java 17 (#449)
bae095a is described below

commit bae095ae480f9293d496f5d2cc8e1994f2acd952
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Wed Nov 17 18:36:34 2021 +0100

    LUCENE-10240: gradle regenerate fails on java 17 (#449)
---
 build.gradle                        | 2 +-
 gradle/generation/regenerate.gradle | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/build.gradle b/build.gradle
index 4d2fbda..b13d195 100644
--- a/build.gradle
+++ b/build.gradle
@@ -97,7 +97,7 @@ configurations {
 
 dependencies {
   // Use a newer groovy that doesn't have illegal reflective accesses.
-  groovy "org.codehaus.groovy:groovy-all:3.0.7"
+  groovy "org.codehaus.groovy:groovy-all:3.0.9"
 }
 
 apply from: file('buildSrc/scriptDepVersions.gradle')
diff --git a/gradle/generation/regenerate.gradle b/gradle/generation/regenerate.gradle
index 78c5f94..d176c6f 100644
--- a/gradle/generation/regenerate.gradle
+++ b/gradle/generation/regenerate.gradle
@@ -71,10 +71,11 @@ configure(rootProject) {
      */
     modifyFile = { File path, Function<String, String> modify ->
       Function<String, String> normalizeEols = { text -> text.replace("\r\n", "\n") }
-      modify = normalizeEols.andThen(modify).andThen(normalizeEols)
 
       String original = path.getText("UTF-8")
-      String modified = modify.apply(original)
+      String modified = normalizeEols.apply(original)
+      modified = modify.apply(modified)
+      modified = normalizeEols.apply(modified)
       if (!original.equals(modified)) {
         path.write(modified, "UTF-8")
       }