Running gradlew produces ": No such file or directory"

Seems like the line endings are not in Unix style (LF).

Open the file in vi and type set fileformat=unix.
Then save :w and try again.