Closed azizkayumov closed 2 years ago
Another option for proguard-payment.pro
I got your point, what about the latest commit? The docs on README.md says one can use the following classes: PaymentActivity.java constants, PaycomSandBox.java and Result.java. I tried to make it as defensive as possible:
-keep class uz.paycom.payment.PaymentActivity {
public static <fields>;
}
-keep class uz.paycom.payment.utils.PaycomSandBox { *; }
-keep class uz.paycom.payment.model.Result { *; }
@AbduazizKayumov Perfectly. You understood me correctly.
?
Standart ProGuard sizning kutubxona sinflaringiz nomini buzadi va o'zgartiradi, shuning uchun Android loyihalarida ularga murojaat qilish imkonsiz bo'ladi. Muammoni takrorlash uchun quyidagi qadamlar:
- A yaratilgan model android loyihani
- Yükladi
implementation 'uz.paycom:payment:1.0.5.5'
uchunbuild.gradle
- Yangilangan va AS yuklab olingan Payme Android SDK.
- README- ni kuzatishga harakat qildim
- EXTRA_ID, EXTRA_AMOUNT, PaymentActivity.java-dan ma'lumot olinmadi .
Men deb taxmin qilish mumkin Odatiy Proguard parametrlarini bilan
minifyEnabled=True
muammoni hal nima bo'ladi? Libs papkasida AS-dagi kutubxonani oldindan ko'rib chiqdim, Payment Android SDK-ning java sinflariga to'la "a" va "b" lar bilan to'ldirilganligini ko'rdim.Ushbu PR-da lib uchun ba'zi bir "iste'molchilar" qoidalarini qo'shdim. Bu boradagi fikrlaringizni menga xabar bering. Odatda kutubxonaning Proguard qoidalari: https://stuff.mit.edu/afs/sipb/project/android/sdk/android-sdk-linux/tools/proguard/docs/index.html#manual/examples.html
????????????????
implementation 'uz.paycom:payment:1.0.5.5'
Shuni aniqlamayapti ?
Default ProGuard will obfuscate and alter the name of your library classes, making it impossible for Android projects to reference them. Here are steps to reproduce the issue:
implementation 'uz.paycom:payment:1.0.5.5'
tobuild.gradle
Can I assume that the default Proguard settings with
minifyEnabled=True
is causing the issue?I previewed the library on AS from libs folder, I can see that Payment Android SDK is full of java classes with "a"s and "b"s.
In this PR I added some basic "consumer" rules for payment lib. Let me know your thoughts on this. A typical library's Proguard rules: https://stuff.mit.edu/afs/sipb/project/android/sdk/android-sdk-linux/tools/proguard/docs/index.html#manual/examples.html