wallabag / android-app

Android application to read your articles saved in your wallabag. You can also easily add new articles.
https://www.wallabag.org
GNU General Public License v3.0
462 stars 260 forks source link

Remove non-foss greendao plugin #1406

Closed di72nn closed 2 months ago

di72nn commented 2 months ago

Add generated DAO classes, remove the generator plugin. I just added the generated classes as is.

A temporary measure to allow app updates be published on F-Droid. The proper solution would be to get rid of greendao, but I can't look into it at the moment.

Kinda resolves #1399.

Upd: clarification: without the generator the DAO classes are not automatically updated when the model classes change (but the model hasn't changed in a while).

blundell commented 2 months ago

@di72nn I'm looking to do the same on another project. Could you briefly explain where the generated classes are located? and any other info about this migration that could help pls :-)

di72nn commented 2 months ago

Sure, @blundell. This is not a proper solution, mind you.

First, you have to build the project locally at least once, so the generator plugin actually generates the source files.

Then the generated sources should be in app/build/generated/source/greendao/<your package>, where <your package> is the DAO package (defined by daoPackage in one of the build.gradle files).

In a non-complicated scenario this is just a matter of moving files to the main source tree (you should be able to drag-n-drop, maybe creating the target package in advance): Screenshot_20240527_220131

After that the greendao plugin can be removed from build.gradle files (see the PR changes).

blundell commented 2 months ago

Awesome, appreciate that - going to attempt it this week. TY!