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

Switch to AndroidX #920

Open sarvajeet294 opened 6 years ago

sarvajeet294 commented 6 years ago

Greendao is not updated for androidx support libraries. Annotations like @UiThread @CallSuper are taken from annotation library but which comes from appcompat.

In androidx appcompat library and annotation librarie's package names are changed. Greendao should keep this scenario in mind and change it accordingly. Please make those changes.

greenrobot-team commented 5 years ago

Please refer to https://developer.android.com/jetpack/androidx/migrate on how to use AndroidX with libraries that do not yet use the new imports.

Keeping this open if we ever want to do a release that requires AndroidX. -ut

softboy99 commented 5 years ago

Hi, I'm also waiting for this feature.Thanks.

prgpascal commented 5 years ago

Hello, this feature is really important for us because we're generating the entities with the greendao-generator. After every DAO/entities generation, we must change the import of NonNull notations, from android.support.annotation.NonNull to androidx.annotation.NonNull. Any workaround for this?

Thanks

greenrobot-team commented 5 years ago

@prgpascal As far as I know and based on a quick check, greenDAO does not use the Android support annotations. It uses its own org.greenrobot.greendao.annotation.NotNull. Maybe you add the Android annotations in your generator code?

prgpascal commented 5 years ago

@greenrobot-team you're right, it was my fault :-/ We currently inject the annotation dependency into our generated entities through our generator class. Changing that dependency solved my issue. Thanks!

greenrobot-team commented 5 years ago

Closing this then.

greenrobot-team commented 5 years ago

Whoops, this issue is about something else. Re-opening.

ZacSweers commented 4 years ago

It's well past the point of holding out I think, as this also prevents other libraries and open source projects that depend on greenDAO from updating. Jetifier is intended to be a temporary cover while libraries migrate, not a permanent reason for them to not migrate.