greenDAO icon indicating copy to clipboard operation
greenDAO copied to clipboard

Switch to AndroidX

Open sarvajeet294 opened this issue 5 years ago • 8 comments

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.

sarvajeet294 avatar Oct 31 '18 15:10 sarvajeet294

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

greenrobot-team avatar Nov 06 '18 14:11 greenrobot-team

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

softboy99 avatar Jan 19 '19 14:01 softboy99

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

prgpascal avatar Aug 28 '19 07:08 prgpascal

@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?

greenrobot-team avatar Sep 03 '19 05:09 greenrobot-team

@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!

prgpascal avatar Sep 19 '19 10:09 prgpascal

Closing this then.

greenrobot-team avatar Sep 23 '19 06:09 greenrobot-team

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

greenrobot-team avatar Sep 23 '19 06:09 greenrobot-team

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.

ZacSweers avatar Jan 20 '20 07:01 ZacSweers