objectbox-java
objectbox-java copied to clipboard
Use system-dependent line separator when generating a meta model JSON
With core.autocrlf = true
for git on Windows the meta model file default.json
is checked out with CRLF line endings. ObjectBox gradle plugin generates default.json
with LF line endings when building a project, so git considers this file to be modified, however in fact the DB scheme is the same.
Maybe it's possible to workaround this using git configuration I'm not aware of, but I suppose it would be preferable to generate line endings that correspond to the current system.
BTW: are you going to open the code of ObjectBox gradle plugin at some future time? 🙂
Not sure how to tackle this, because not everybody does core.autocrlf = true
(e.g. I do not).
And yes, current plans are to open source the gradle plugin once we find the time for some clean up.
@greenrobot
Any plans for adding a fix for this issue?
It's really annoying to revert the change to default.json
file every single time we do a build or checkout another branch
@javaherisaber As @greenrobot notes:
Not sure how to tackle this, because not everybody does core.autocrlf = true (e.g. I do not).
So even if we add a plugin config option or some auto-detection, that might not work if developers work on different operating systems or have different Git settings. Suggestions welcome!