objectbox-java icon indicating copy to clipboard operation
objectbox-java copied to clipboard

Use system-dependent line separator when generating a meta model JSON

Open SergeyPoluyanov opened this issue 7 years ago • 3 comments

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? 🙂

SergeyPoluyanov avatar Sep 12 '17 13:09 SergeyPoluyanov

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 avatar Sep 12 '17 13:09 greenrobot

@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 avatar Apr 25 '23 07:04 javaherisaber

@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!

greenrobot-team avatar May 02 '23 08:05 greenrobot-team