Closed jschmid closed 1 week ago
Hi @jschmid, thanks for reaching out and for the detailed investigation. Unfortunately we do not have a solution for this on our side at the moment. repackageclasses
will not work, since according to the documentation:
Counter-indication: classes that look for resource files in their package directories will no longer work properly if they are moved elsewhere. When in doubt, just leave the packaging untouched by not using this option.
EDIT: I actually think repackageclasses
doesn't matter in this context because we are not the ones minifying the Twint SDK code, we receive an already packaged version.
We are working with Twint on resolving these issues, we hope that we will be able to provide a fix in the coming weeks. We will also contact you internally to provide more details and inform you about the progress.
In the meantime, please do reach out to Datatrans as well to make sure they are aware of the issue. Let me know if you have any more questions.
Thank you for the swift reply @jreij.
I don't know if you have access to the Twint classes, or already a jar/aar. A solution would be to rename the package before compilation instead of using R8.
Similar report on Datatrans: https://github.com/datatrans/android-sdk/issues/25
@jschmid thanks for the suggestion. We receive a jar from Twint which is already minified so we simply include it in our own twint
module and publish it.
I'm going on vacation. Handing over the topic to my colleague @gtomek.
Thanks for the work! Now we wait for Datatrans to release their update, and we should be good!
Describe the bug We are not able to upgrade to SDK v5.4+ because of a name clash with the Twint integration.
To Reproduce Include
com.adyen.checkout:drop-in:5.6.0
andch.datatrans:android-sdk:3.6.1
in the same project. Try to compile the project. You get an error:Expected behavior
It is possible to include Adyen & Datatrans SDKs in the same project, and use Twint.
Additional context
I have a repro project that shows the issue: https://github.com/jschmid/AdyenDatatransClash This is the default Android Studio project, with only the dependencies added.
If you take commit https://github.com/jschmid/AdyenDatatransClash/commit/ae250c504d71f77f5cf7a1fa8c4fe5d1ba2b9473, you will see that it does not compile. A workaround is to exclude the Adyen Twint library: https://github.com/jschmid/AdyenDatatransClash/commit/29b908538fa1124d5fae8c7c27cb8bcbb8d98875
However this is only temporary for us as we want to use Twint on Adyen.
At first I thought that it could be linked to https://github.com/Adyen/adyen-android/issues/1666, but release 5.6.0 does not solve the issue for us.
I went down the rabbit hole and found this:
ch.twint.payment.sdk
.We kindly request that you find a way to not clash with Twint classes. If you are going to keep packaging the Twint SDK into your own SDK, one solution would be to repackage the Twint SDK under your own package, using Proguard repackageclasses.