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:37:07 UTC

[lucene] branch branch_9x 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 branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git


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

commit 8d070180501f8e4dbc5ad3b6a6ee51c97cb12991
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 e747b7d..bf2f34d 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")
       }