Closed karntrehan closed 7 years ago
Currently the generated files only seem to work in the 'app' module. What exactly happens when you try it on a library module?
We'll look into it - probably next week. Meanwhile you could try to have a plain-Java "persistence" module with all entities and DAOs. Make it a dependency to the library modules. We did this before and it worked.
Initially we were trying to refactor our existing app to a multimodule structure.. Yesterday I created a new project with just the DAO dependencies in the app_core library module and the files were generated in the library module itself. There must be a configuration mix-match in our existing app which we will now try to figure out. Nothing related to GreenDao. Thanks for your support.
@karantrehan Also try to update the greenDAO Gradle plugin to org.greenrobot:greendao-gradle-plugin:3.2.1
(from 3.1.1
). It switched to an official Android Gradle Plugin API to better integrate into the build process. -ut
Following is the structure of the our app:
app_core is the library module which should contain all the daos which would be accessed by app_feature1,app_feature_2, etc.. Also app_core should also contain the generated DaoMaster, DaoSession among other generated files. Currently the generated files only seem to work in the 'app' module. We tried to play with the targetGenDir and daoPackage parameters in app_core to change the generation path, but did not help.
Following is the excerpt of the build.gradle (project)
Following is the excerpt of the build.gradle(app_core):