hbb20 / CountryCodePickerProject

Country Code Picker (CCP) is an android library which provides an easy way to search and select country or international phone code. Also supports Android EditText phone mask and international phone validation.
Apache License 2.0
1.52k stars 505 forks source link

CountryCodePicker still depends on old AppCompat, so Jetifier still needs to be used #451

Closed BoD closed 3 years ago

BoD commented 3 years ago

Hi! This library depends on Recycler Bubble, which hasn't been updated in 4 years, and still depends on the old AppCompat. Although there is a PR to migrate to AndroidX, waiting to be merged since Jun 2019, it looks like we can assume it will never be merged.

Because of this, unfortunately, users of your lib must use Jetifier, which is a step that contributes to build slowness.

One possible solution would be to simply copy the classes into your own project (it is only 9 classes, and the license is Apache v2) and remove the dependency. Another (more complicated) way would be to fork the project.

Additional note: this Gradle plugin helps detecting if a project still depends on any old AppCompat dependencies, to determine if Jetifier can be disabled. Unfortunately it didn't work with CountryCodePicker and I suspect it is because of this exclusion in your build.gradle file:

   implementation('com.futuremind.recyclerfastscroll:fastscroll:0.2.5', {
        exclude group: 'com.android.support'
    })

I'm not 100% certain this exclusion makes sense.

SerggioC commented 3 years ago

copy the fastlib to the ccp project, update the lib and make a pull request to CountryCodePickerProject, maybe it'll be merged.

BoD commented 3 years ago

@hbb20 Would that be a good idea?

SerggioC commented 3 years ago

Well I've just updated it and added it into the project. Check the pull request please. https://github.com/hbb20/CountryCodePickerProject/pull/453

BoD commented 3 years ago

Very cool, I hope this will be merged!