BranchMetrics / android-branch-deep-linking-attribution

The Branch Android SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/pages/apps/android/
MIT License
401 stars 156 forks source link

Branch prevents removing Jetifier #894

Open zsperske opened 3 years ago

zsperske commented 3 years ago

We're trying to remove Jetifier to improve our build times, Branch is one of the few dependencies we have left that still has old support library references.

Using the plugin at: https://github.com/dipien/bye-bye-jetifier

Scanning io.branch.sdk.android:library:5.0.5 Absoulute path: /Users/zacharysperske/.gradle/caches/modules-2/files-2.1/io.branch.sdk.android/library/5.0.5/bab5c6f5553b9e96f62707357be99af181f3ebcf/library-5.0.5.aar Graphs to this dependency: +---io.branch.sdk.android:library:5.0.5 Issues found:

poldz123 commented 3 years ago

Any update on this?

mochadwi commented 3 years ago

+1 any update on this?

mochadwi commented 3 years ago

branch.io v5.0.7 still unable to disable jetifier with the same issues above found

mochadwi commented 3 years ago

is it possible to fork the branch.io and publish it on our private maven repository and use it as our dependencies? or is it requires extra configurations to make branch.io works when we forked it?

mochadwi commented 3 years ago

:( any updates?

mattt-seek commented 3 years ago

+1 here

KrestM commented 3 years ago

Any update about that?

KennethNickles commented 3 years ago

Any updates on this?

KennethNickles commented 3 years ago

I dug into the code a bit and it looks like the plugin in question https://github.com/dipien/bye-bye-jetifier is strictly doing a string search for support dependencies. Branch is actually only referencing the support lib dependencies via reflection to see if they are present in the class path.

try {
    CustomTabsClientClass = Class.forName("android.support.customtabs.CustomTabsClient");
    CustomTabsCallbackClass = Class.forName("android.support.customtabs.CustomTabsCallback");
    CustomTabsSessionClass = Class.forName("android.support.customtabs.CustomTabsSession");
    ICustomTabsServiceClass = Class.forName("android.support.customtabs.ICustomTabsService");
} catch (Exception t) {
    isCustomTabsAvailable_ = false;
}

Its not actually dependent on them

mochadwi commented 3 years ago

I dug into the code a bit and it looks like the plugin in question https://github.com/dipien/bye-bye-jetifier is strictly doing a string search for support dependencies. Branch is actually only referencing the support lib dependencies via reflection to see if they are present in the class path.

try {
    CustomTabsClientClass = Class.forName("android.support.customtabs.CustomTabsClient");
    CustomTabsCallbackClass = Class.forName("android.support.customtabs.CustomTabsCallback");
    CustomTabsSessionClass = Class.forName("android.support.customtabs.CustomTabsSession");
    ICustomTabsServiceClass = Class.forName("android.support.customtabs.ICustomTabsService");
} catch (Exception t) {
    isCustomTabsAvailable_ = false;
}

Its not actually dependent on them

ahh, it's safe to remove the jetifier then?

KennethNickles commented 3 years ago

I believe so

mochadwi commented 3 years ago

A question for the branch team:

Is there any concern why branch.io referencing the support lib dependencies (not an androidx libs) via reflection?

GianfrancoMS commented 3 years ago

+1

dannyroa commented 3 years ago

It seems like after this library is jetified, isCustomTabsAvailable will always be false

mochadwi commented 3 years ago

It seems like after this library is jetified, isCustomTabsAvailable will always be false

This the actual concern we're not sure, did we need to use Custom tabs or not via Branch. Leaves us do nothing for now! Unless official statement from branch team

NitinPraksash9911 commented 2 years ago

any updates on this????????

wartingep commented 1 year ago

+1

warting commented 1 year ago

branch io is already using androidx and this is a false possitive report from bye bye jetifier.

use the official ./gradlew checkJetifier to see if jetifier can be removed

DoronK commented 1 year ago

Any progress on this issue? Still happens on V5.4.0