splitwise / TokenAutoComplete

Gmail style MultiAutoCompleteTextView for Android
Apache License 2.0
1.3k stars 384 forks source link

AndroidX support #362

Closed cckroets closed 2 years ago

cckroets commented 5 years ago

Now that Android Studio 3.2.0 and androidx 1.0.0 libraries have been released, is there a plan to migrate to androidx? Google has said there won't be any more feature releases under the android.support packaging.

dragossusi commented 5 years ago

you can do this in gradle.properties using

android.useAndroidX=true
android.enableJetifier=true
mgod commented 5 years ago

As currently written, the 2.* version of the library does not depend on the support library at all, so this should already support androidx.

I'm planning to have the 3.0 version use the android.support libraries. Given that you can get gradle to take android.support dependencies and swap them automatically, I don't see much value in moving to androidx until most developers are targeting API 28, which is probably about a year in the future.

The main reason to have the library target a specific version will be to minimize the chance of bugs on a specific platform/library version, and historically there have not been a lot of changes to the autocomplete widget classes since Android API 14. When I put the 3.0 release together, I'll do some checking on this to make sure I'm not expecting major differences in the autocomplete between android.support and androidx.

If anyone has guides on easily doing library releases and maintaining a library with androidx and android.support side by side (especially running tests against both platforms), please let me know! I'm happy to look into changing this sooner, but as long as I have to pick one to test and release against, I'll probably stick with android.support for now.

Also, if you're running into specific issues with androidx using the jetifier utility, I'm happy to work on that as well.

mgod commented 5 years ago

Version 3.0.0 does now use the support library, though as mentioned above, I do not plan to move the library to AndroidX yet.

scottyab commented 4 years ago

Hey @mgod Thanks for the awesome library. Just adding my 2p on the AndroidX debate. I personally don't feel it's worth the effort of supporting both android.support and AndroidX. However it might be time to switch to AndroidX?. Since Google's Firebase SDK dropped android.support and switched to AndroidX in June 2019 I know several libraries (all be it commercial ones like Stripe) followed suit to switch to AndroidX within a few months. One of the key benefits being quicker builds as no need to use Jetifier.

Let me know if this is something you'd be interested in as PR - I guess for v4.0 given it's a breaking change.

mgod commented 4 years ago

@scottyab yep! It's definitely time to move on here (more than a year from my delay comment). A PR with this change and 4.0 as the version would be appreciated.