palantir/gradle-consistent-versions

Write the lock file with consistent line endings (or make them configurable)

dweiss opened this issue · 0 comments

Currently ConflictSafeLockFile.java uses writer.newLine which emits system-dependent line endings. This is mildly annoying as it results in file differences on different systems.

I think it'd be great to either allow the line endings to be configurable... or at least write to an in-memory buffer, compare against the existing file and not touch it if the content is whitespace-identical.

I can provide a patch for this, if you're interested, but it should be a trivial change.