Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to androidx #38

Closed
calvarez-ov opened this issue Nov 13, 2019 · 23 comments
Closed

Migrate to androidx #38

calvarez-ov opened this issue Nov 13, 2019 · 23 comments
Assignees
Labels
enhancement is an enhancement to the SDK pending release Will be released in the next release

Comments

@calvarez-ov
Copy link

This sdk is still using the android support library, which is deprecated. Androidx has been out for quite a while now (over a year?). We'd like to remove jetifier from our app build process, but won't be able to until the sdks we use are on androidx.

@darshanclevertap
Copy link
Collaborator

Hi @calvarez-ov

We are still using the Android support library because moving to AndroidX will cause a breaking change for apps who have not yet migrated to AndroidX. Jetifier helps apps migrated to AndroidX deal with non-AndroidX dependencies (like us). The vice versa is not possible. If jetifier works for you right now, I'd suggest holding on to it for a few more months.

Out of curiosity, out of all the SDKs used by your app, how many have migrated to AndroidX?

@calvarez-ov
Copy link
Author

In our project, two sdks haven't migrated to androidx yet: CleverTap and MapBox.

@darshanclevertap
Copy link
Collaborator

@calvarez-ov I will mark this as an enhancement and take this up internally with my team but I cannot promise you any timelines for now. Hope you understand. Be that as it may, you will be the first to know when we are planning to migrate to AndroidX. Thanks!

@darshanclevertap darshanclevertap self-assigned this Nov 18, 2019
@darshanclevertap darshanclevertap added the enhancement is an enhancement to the SDK label Nov 18, 2019
@dtonybarajas
Copy link

Hi, @darshanclevertap do you have some idea CleverTap can migrate to AndroidX. Because in my project I am using AndroidX and App inbox is not working it appears a message "Please upgrade com.android.support:design library to v28.0.0 to enable Tabs for App Inbox, dropping Tabs"

Thanks!

@darshanclevertap
Copy link
Collaborator

@TonyBarajas We are still evaluating when to migrate to AndroidX. Meanwhile, for your App Inbox issue, I'd recommend adding the following two dependencies -

implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'

Let me know if this works out for you!

@dtonybarajas
Copy link

Hi @darshanclevertap I added the two dependencies and the logs just says the same:
Please upgrade com.android.support:design library to v28.0.0 to enable Tabs for App Inbox, dropping Tabs
Note: I am still using
android.enableJetifier=true
android.useAndroidX=true

Do you know some workaround to be able to use App inbox with AndroidX?
Thanks!

@calvarez-ov
Copy link
Author

In our project, now mapbox has migrated to androidx.

That makes CleverTap the only sdk in our app that still hasn't migrated to androidx.

@mochadwi
Copy link

mochadwi commented Apr 8, 2020

Waiting for this, to be officialy supported.

Meanwhile, I'm trying to host into internal private maven repository to change the actuals import package from support library to androidx instead, using jetifier-standalone from google

@calvarez-ov
Copy link
Author

calvarez-ov commented Apr 8, 2020

androidx has been stable for 1.5 years now. Can you please do the migration? Other projects who haven't migrated yet and are using CleverTap can continue to use the current 3.7.2 version of CleverTap. If they haven't yet migrated to androidx, they're probably used to using legacy versions of libraries anyway 😛 The rest of us can continue to use recent stable versions of all libraries without having to resort to workarounds like @mochadwi has started to do.

@calvarez-ov
Copy link
Author

Chet Haase from Google says “it’s time” to migrate to androidx:

https://youtu.be/2ov_23fTwyU?t=2m45s

At 2:45 in the video.

@mochadwi
Copy link

really agreed @calvarez-ov more and more recommendation from google for the apps and library developer to migrate into AndroidX, especially Android 11 and above, and they will stop the support library, really waiting for this to come officially :)

@mochadwi
Copy link

Since reading this closed #43 regarding firebase messaging, seems that a lot of clevertap functionality replaced such as FcmTokenListener and InAppNotification due to still using Support Library and firebase (below 19.x)

@calvarez-ov @darshanclevertap

@darshanclevertap
Copy link
Collaborator

darshanclevertap commented Apr 27, 2020

@calvarez-ov @mochadwi We cannot migrate to AndroidX till there is some official announcement of the deprecation of the older support libraries as we have more than 8000 clients and developers using our SDK. Not all of them have moved to AndroidX and since the jetifier method is available for now as a workaround for people who have chosen to migrate.
Also @mochadwi your InAppNotificationActivity issue is something else and I've already replied on #68 .

@calvarez-ov
Copy link
Author

calvarez-ov commented Apr 27, 2020

The message from Googler Chet Haase saying the time is now, isn't enough?

@calvarez-ov
Copy link
Author

The main page for the support library has a "DEPRECATED" watermark all over it: https://developer.android.com/topic/libraries/support-library :

image

It also says

We recommend using the AndroidX libraries in all new projects. You should also consider migrating existing projects to AndroidX as well.

@calvarez-ov
Copy link
Author

Nick Anthony, Program Manager Android Jetpack, wrote an article a month ago saying "now is the time" to migrate to androidx: https://medium.com/androiddevelopers/migrating-to-androidx-tip-tricks-and-guidance-88d5de238876

Among the other reasons, the top one is:

The Android Support Library has reached the end of its life. 28.0 was the last release of the Android Support namespace and the namespace is no longer maintained.

@hannesstruss
Copy link

@darshanclevertap out of curiosity, how many of your clients using the SDK have not yet migrated to AndroidX? I'd assume this number is pretty low, would it make sense for you to fork and freeze the CleverTap SDK for these clients, backporting only important security fixes and making life easier for the majority of your clients?

@mochadwi
Copy link

@darshanclevertap out of curiosity, how many of your clients using the SDK have not yet migrated to AndroidX? I'd assume this number is pretty low, would it make sense for you to fork and freeze the CleverTap SDK for these clients, backporting only important security fixes and making life easier for the majority of your clients?

yes, backported for support library seems better (if there's bugfix) e.g in the latest supported AndroidX

@calvarez-ov
Copy link
Author

I opened a ticket with Google to add the word "deprecated" in the text of the support library page (in addition to the existing big "DEPRECATED" watermark): https://issuetracker.google.com/issues/155005450

Their reply (sorry if it's a big aggressive...):

I don't understand what this is asking for. We won't be doing another Support Library release to @deprecate the classes -- there are no more Support Library releases.

The page is clear about the status of the Support Library:

You can continue to use the support library. Historical artifacts (those versioned 27 and earlier, and packaged as android.support.*) will remain available on Google Maven. However, all new library development will occur in the AndroidX library.

Regarding the reason,

Our project uses an SDK whose maintainers refuse to update to androidx until "there is some official announcement of the deprecation of the older support libraries"

That sounds like a thinly-veiled excuse to avoid doing the work.

@abhimaanmadhav
Copy link

@darshanclevertap still thinking of migration ? Being one our client we would strongly recommend you to migrate to androidX. if you have a few clients who are using support then maintain 2 sdk policy androidx,non androidx.

@darshanclevertap
Copy link
Collaborator

Hi guys, extremely sorry for the delay but I'm pleased to announce we have actively started working on the migration of our SDK to AndroidX support libraries. You can expect the AndroidX version to be out next month.

@darshanclevertap
Copy link
Collaborator

Hi guys,

We have brought AndroidX and Android 10 support in the CleverTap Android SDK v4.0.0. This is a major release so please check out the changes here which we have made before updating.

@mochadwi
Copy link

Thanks a lot for this @darshanclevertap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement is an enhancement to the SDK pending release Will be released in the next release
Projects
None yet
Development

No branches or pull requests

6 participants