Skip to content

Commit

Permalink
Fix updateCopyright Gradle task to read files in UTF-8
Browse files Browse the repository at this point in the history
This would avoid non-ASCII symbols breakage on those operating systems where UTF-8 is not default
  • Loading branch information
artembilan committed Jan 11, 2024
1 parent e2f721b commit 73111d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ configure(javaProjects) { subproject ->
def beginningYear = matcher[0][1]
if (now != beginningYear && now != matcher[0][2]) {
def years = "$beginningYear-$now"
def sourceCode = file.text
def sourceCode = file.getText('UTF-8')
sourceCode = sourceCode.replaceFirst(/20\d\d(-20\d\d)?/, years)
file.text = sourceCode
println "Copyright updated for file: $file"
Expand Down

0 comments on commit 73111d9

Please sign in to comment.