0

I am building a Spring-Boot Application (2.1.4.RELEASE) and I am creating a Gradle Wrapper for it using

gradle clean wrapper

My gradle version is 5.4

What is happening is that when I try to push my changes into Gerrit I am getting this error:

remote: error: found carriage return (CR) character in file: gradle/wrapper/gradle-wrapper.jar remote: error: found carriage return (CR) character in file: gradlew.bat

I am using Ubuntu 18.04 (Windows 10 Native Client)

I tried in my Windows machine and the problem is the same, I tried to switch to Gradle 4 and the same problem happens, Gradle 3 can't compile my application anymore so it is not an option.

Ideas?

José Mendes
  • 950
  • 2
  • 14
  • 30

1 Answers1

1

It seems that your Gerrit server is using the plugin uploadvalidator or other similar one. This plugin has a feature to reject files with carriage return (CR) in the line endings (search for "rejectWindowsLineEndings" here).

To resolve this issue remove the carriage returns in the gradle/wrapper/gradle-wrapper.jar and gradlew.bat files. See how to do this here.