-
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
A bug on greendao-gradle-plugin when parallel execution task :app:greendao #914
Comments
I want to fix this bug. But |
As the error message indicates, your constructors have changed in between runs. Have a look at the docs on how to resolve this: http://greenrobot.org/greendao/documentation/modelling-entities/#Modifying_generated_code Closing. Please re-open if you can verify (example code) that this is indeed an issue with the plugin. |
I make a litter demo for this bug: [ReplayBug4GreenDAOPlugin] (https://github.com/zhenian/ReplayBug4GreenDAOPlugin) https://github.com/zhenian/ReplayBug4GreenDAOPlugin replay step:
|
We (Gradle core team) also found this issue. Seems like when two subprojects both apply greendao plugin and enable Thanks @zhenian for the reproducible sample. One workaround I found is "simulating" serailization execution:
My speculation is greendao plugin lacks proper synchronization between different subproject. I'd like to see the plugin source code very much. |
@zhenian can you please reopen this issue? |
@greenrobot-team had closed this issue so I have no right to reopen it. @greenrobot-team , can you recheck this issue? Add a new issue and reference to this issue |
Well, AFAIK the author can reopen it, unless this issue is locked. Maybe I'm wrong. |
I thought so too, sorry, reopening. However, can not reproduce using the given example project updated to Gradle 4.10.2. @zhenian As @blindpirate suggested this may be due to Gradle parallel mode. Do you have I see it commented out in the projects Maybe try to explicitly disable parallel mode by adding edit: You mention parallel execution in the title, so that must be it. |
I can reproduce with the given sample by running BTW, |
We don't generally want to recommend disabling parallel mode because it can really slow down a build. After all, my machine alone has 8 cores. Do I want 7 of them doing nothing during a build? |
Putting the following into the root
You can now run |
Is there a plan to fix this bug? if no, is there a plan to release Gradle plugin Source codes? #412 |
Background
In a gradle project, there are two apps which use greenDAO. Define in
settings.gradle
:in
:app
and:app2
, there are some same classes defined at packagecom.xxx.model
which mark with@org.greenrobot.greendao.annotation.Entity
. Same name, same fields.Issue
when I build or clean with commands:
./gradlew :app:assembleDebug
./gradlew :app:greendao
./gradlew :app1:assembleDebug
./gradlew :app1:greendao
It is ok.
but, when I make
Clean Project
with Android Studio, there is a error.gradle task seqs:
error message:
The text was updated successfully, but these errors were encountered: