Fix Gradle build to read files in UTF-8
https://build.spring.io/browse/INT-SI51X-18 When we have non-standard symbols in the source code, the `updateCopyrights` Gradle task may break them after because of non-compatible encoding between file reader and source code. * Add `org.gradle.jvmargs='-Dfile.encoding=UTF-8'` to the `gradle.properties` to enforce an expected file reading encoding. * Fix `AbstractFilePayloadTransformerTests` to bring non-standard symbols back
This commit is contained in:
@@ -232,7 +232,7 @@ subprojects { subproject ->
|
||||
def years = "$beginningYear-$now"
|
||||
def sourceCode = file.text
|
||||
sourceCode = sourceCode.replaceFirst(/20\d\d(-20\d\d)?/, years)
|
||||
file.write(sourceCode)
|
||||
file.text = sourceCode
|
||||
println "Copyright updated for file: $file"
|
||||
}
|
||||
break
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
version=5.1.4.BUILD-SNAPSHOT
|
||||
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
|
||||
|
||||
@@ -42,7 +42,7 @@ public abstract class AbstractFilePayloadTransformerTests<T extends AbstractFile
|
||||
|
||||
static final String DEFAULT_ENCODING = "UTF-8";
|
||||
|
||||
static final String SAMPLE_CONTENT = "HelloWorld\n????";
|
||||
static final String SAMPLE_CONTENT = "HelloWorld\näöüß";
|
||||
|
||||
T transformer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user