mirror of https://github.com/apache/lucene.git
LUCENE-10240: gradle regenerate fails on java 17 (#449)
This commit is contained in:
parent
0eeba8d37c
commit
bae095ae48
|
@ -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')
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue