-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building Project creates a different DaoSession and DaoMaster on Windows vs Mac #880
Comments
The same to me.Compile on Mac. |
I decompile plugin classes, find that the reason of wrong sort is "Java File.class" creating File(is a directory) object depends on the PC Operate System. On windows, children of the directory File Object are sorted by dictionary, e.g A.java, B.java, C.java, etc.But on my macOS(version 10.13.5), there are B.java, C.java. A.java. |
@JeckChou I develop a plugin resolved the problem.Just use it to replace the 'greendao-gradle-plugin'. https://github.com/wurensen/Greendao3GradlePlugin |
@wurensen thank you for your reply. you solve my problem. I`m develop on mac too. but from my partner, he is also face to the same problem with window system. it is strange |
@wurensen thanks for your help |
@MappApp Let your partner use my plugin and run the gradle task 'greendaoGenerate' |
As a workaround you can try to set the daoPackage property in the greendao closure:
This way greenDAO won't choose a package automatically. |
@greenrobot-team It doesn't work.At first my team set 'daoPackage'. |
@wurensen What does not work? Are the generated classes still in another package? -ut |
@greenrobot-team I mean the contents of 'DaoMaster.java' aren't sorted by dictionary. |
@greenrobot-team I am not means the generated classes in different package , it was said that the generated DaoSession class and DaoMaster class implementation is changed. eg. |
If we use 'daoPackage "com.example.model"' than it is ignoring all subfolders. |
This issue was fixed internally (imports are now always sorted) and will be available with the next update. Note: Anyhow I recommend generating the greenDAO classes on-demand into the build folder and removing them from source control. E.g. remove |
|
when I compile my project , the files that DaoMaster and DaoSession will be changed even I have to do nothing with it. I`m puzzled by this change when I track them with git version control. what should I do to avoid it ?
any one can help me ? thanks
The text was updated successfully, but these errors were encountered: