stripe-android icon indicating copy to clipboard operation
stripe-android copied to clipboard

[BUG] Shipping Dagger code/dependencies

Open chrisjenx opened this issue 1 year ago • 1 comments

Summary

You are shipping Dagger dependencies and code in your sdks, as third party library it is poor etiquette to force unnecessary dependencies on your consumers. Dagger is not needed in Stripe and at minimum should stripped via R8 or best case as a library be a good citizen and cut down on dependencies you require.

Code to reproduce

stripepaymentsheet jar

Android version

All

Impacted devices

All

Installation method

Gradle

Dependency Versions

For kotlin: NA For stripe-android: 20.38.0 For Android Gradle Plugin: NA For Gradle version: 8.7

SDK classes

com.stripe.android.customersheet.injection.*

Other information

e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath: class com.stripe.android.customersheet.injection.CustomerSheetViewModelModule_Companion_ContextFactory, unresolved supertypes: dagger.internal.Factory

chrisjenx avatar Apr 13 '24 19:04 chrisjenx

Hi @chrisjenx we do use dagger quite extensively, and have no plans to remove it.

That being said, we don't want consumers of our SDK to know or care about dagger! We should be correctly exposing the dependencies here: https://github.com/stripe/stripe-android/blob/aef0bd02587da737085f77041f532ea088439a23/paymentsheet/build.gradle#L32

But the fact that you have a crash tells me something isn't right. Can you tell me more about the crash, and how to reproduce it?

jaynewstrom-stripe avatar Jun 17 '24 17:06 jaynewstrom-stripe

@chrisjenx please reopen with steps to reproduce.

jaynewstrom-stripe avatar Jul 02 '24 18:07 jaynewstrom-stripe