greenrobot / greenDAO

greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases.
http://greenrobot.org/greendao/
12.63k stars 2.89k forks source link

greenDao #994

Open qiaoxianzhu opened 4 years ago

qiaoxianzhu commented 4 years ago

Hello, I want to ask a question about greenDao.

greendao { schemaVersion 1 // daoPackage 'com.test.xxx.greendao.gen' targetGenDir 'src/main/java' }

Can I dynamically generate the above content with code?

greenrobot-team commented 4 years ago

These are options for the Gradle plugin. So as usual for Gradle you can generate these values somehow inside the build script.

Note: typically you do not have to specify a targetGenDir, only a schemaVersion. http://greenrobot.org/greendao/documentation/modelling-entities/#Schema

qiaoxianzhu commented 4 years ago

Well, I mean Can i implement it in another way instead of in Gradle?

greenrobot-team commented 4 years ago

Not that I am aware of. You would have to ask the Gradle folks about that.