From dc5e8753963928850b3092a456090b5e1560e981 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 15 Jul 2016 15:54:05 +0200 Subject: [PATCH] Ensure Spotless works on Microsoft Windows This commit is an attempt to ensure that Spotless in the JUnit 5 build works properly when run on Microsoft Windows. Specifically, line endings for text files checked out via Git are now forced to LF instead of allowing automatic conversion to CFLF on Windows. In addition, Spotless has been configured to use 'UNIX' line endings (i.e., LF). Issue: #398 --- .gitattributes | 1 + build.gradle | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000000..fcadb2cf9791 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text eol=lf diff --git a/build.gradle b/build.gradle index eeba690d99a8..743f19da89e4 100644 --- a/build.gradle +++ b/build.gradle @@ -96,6 +96,7 @@ allprojects { eclipseFormatFile rootProject.file('src/eclipse/junit-eclipse-formatter-settings.xml') trimTrailingWhitespace() + lineEndings 'UNIX' endWithNewline() custom 'Lambda fix', { it.replace('} )', '})').replace('} ,', '},') } @@ -395,11 +396,13 @@ configure(rootProject) { target '**/*.gradle', '**/*.gitignore' indentWithTabs() trimTrailingWhitespace() + lineEndings 'UNIX' endWithNewline() } format 'documentation', { target '**/*.adoc', '**/*.md' trimTrailingWhitespace() + lineEndings 'UNIX' endWithNewline() } }