stripe-android
stripe-android copied to clipboard
[BUG] Shipping Dagger code/dependencies
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
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?
@chrisjenx please reopen with steps to reproduce.