Application build failed on Windows because of RegexpMultiline rule in checkstyle file.
Software versions
Briefcase v1.8.0, Java v1.8.0_151, operating system - Windows 7.
Problem description
Application build failed when tried to use gradlew build command. Problem is caused by RegexpMultiline mode and after removing it from checkstyle file application build finished successfully.
Lines removed from checkstyle.xml:
<module name="RegexpMultiline">
<property name="format" value="\r\n"/>
<property name="message" value="Do not use Windows line endings"/>
</module>
Steps to reproduce the problem
- Go to command line.
- Use gradlew build command.
Expected behavior
Building process should finish successfully.
Other information
Problem does not show up on Ubuntu system.
Hello @yanokwa I just rebased to the latest master and I wasn't able to reproduce this issue. The build passed with no errors. Note: OS is windows 10 and not windows 7
Thanks, @icemc. @kkrawczyk123 Since you filed the issue, can you see if you can reproduce this?
@yanokwa Yes , I checked on windows 10 and I still can reproduce this issue. I created new repository, cloned code forom git and tried gradlew.buld . This is my result:

When I removed lines from checkstyle.xml as in description above, build was successfull.
Was able to reproduce this on my new machine running windows 10
I was also able to reproduce this issue on Win 10 Pro. I used a linux utility dos2unix to test and see how many files need to be converted to use Unix line endings (CRLF -> LF) and it looks like a few files in the repo need to be converted. After they were converted, the project was able to pass gradlew check -x test. There were failing unit tests and it appears the reason is because the path separator isn't compatible between windows and linux (eg. C:\Users\testUser\Video vs /usr/local/path, respectively). So, in the failing unit tests, wherever a directory or file is mentioned, you would have to replace the / with File.separator.
I believe this issue can be resolved by following these steps:
- Convert project repo files to use Unix line endings (should just be 2 files)
- Fix failing unit tests by replacing files and/or directories mentioned in a unit test with
File.separatorin the path.