Skip to content

Commit b281cf5

Browse files
fice-tmergify[bot]
authored andcommitted
Fix gradle version code generation on Windows
Building on Windows with the git config `core.autocrlf=true` (sorry) results in a line ending of `\r\n` in `version.txt`, so just removing `\n` leaves trailing whitespace in the resulting Java code that ends in a build failure.
1 parent 19c4186 commit b281cf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def setupProject(name, path, description) {
7171

7272
def yaml = new Yaml()
7373
def buildconfig = yaml.load(new File(rootDir, '.buildconfig.yml').newInputStream())
74-
def componentsVersion = new File(rootDir, 'version.txt').text.replaceAll('\\n', '')
74+
def componentsVersion = new File(rootDir, 'version.txt').text.stripTrailing()
7575
buildconfig.projects.each { project ->
7676
setupProject(project.key, project.value.path, project.value.description)
7777
}

0 commit comments

Comments
 (0)