android-branch-deep-linking-attribution icon indicating copy to clipboard operation
android-branch-deep-linking-attribution copied to clipboard

Branch prevents removing Jetifier

Open zsperske opened this issue 4 years ago • 19 comments

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:

  • io/branch/referral/BranchStrongMatchHelper.class -> android.support.customtabs.CustomTabsClient
  • io/branch/referral/BranchStrongMatchHelper.class -> android.support.customtabs.CustomTabsCallback
  • io/branch/referral/BranchStrongMatchHelper.class -> android.support.customtabs.CustomTabsSession

zsperske avatar Feb 21 '21 22:02 zsperske

Any update on this?

poldz123 avatar Mar 02 '21 05:03 poldz123

+1 any update on this?

mochadwi avatar Mar 07 '21 04:03 mochadwi

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

mochadwi avatar Mar 08 '21 12:03 mochadwi

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 avatar Mar 15 '21 12:03 mochadwi

:( any updates?

mochadwi avatar Mar 29 '21 07:03 mochadwi

+1 here

mattt-seek avatar May 21 '21 12:05 mattt-seek

Any update about that?

KrestM avatar Jun 21 '21 12:06 KrestM

Any updates on this?

KennethNickles avatar Aug 26 '21 17:08 KennethNickles

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

KennethNickles avatar Aug 26 '21 21:08 KennethNickles

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?

mochadwi avatar Aug 27 '21 15:08 mochadwi

I believe so

KennethNickles avatar Aug 27 '21 16:08 KennethNickles

A question for the branch team:

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

mochadwi avatar Aug 29 '21 04:08 mochadwi

+1

GianfrancoMS avatar Sep 16 '21 03:09 GianfrancoMS

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

dannyroa avatar Oct 14 '21 21:10 dannyroa

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

mochadwi avatar Oct 29 '21 03:10 mochadwi

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

NitinPraksash9911 avatar Aug 09 '22 08:08 NitinPraksash9911

+1

wartingep avatar Nov 24 '22 06:11 wartingep

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

warting avatar Nov 24 '22 08:11 warting