From a38dd47fa7ad9ef1d05d37fe69d1883d84990166 Mon Sep 17 00:00:00 2001 From: Chintan Soni Date: Thu, 4 May 2023 13:25:46 +0100 Subject: [PATCH 1/5] Fix for duplicate class errors --- app/build.gradle | 2 +- app/proguard-rules.pro | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 2215710..3be7768 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -86,7 +86,7 @@ dependencies { // Duplicate class f.c found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) // Duplicate class g.a found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) // Duplicate class g.b found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) - implementation 'com.checkout:checkout-sdk-3ds-android:2.0.4' + implementation 'com.checkout:checkout-sdk-3ds-android:3.0.1-testonly-01' // when frames is added to the project together with checkout 3ds, we have the following error: // Type com.checkout.eventlogger.R is defined multiple times: /Users/jangonera/projekty/poligon/checkoutminify/app/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/debug/R.jar:com/checkout/eventlogger/R.class, /Users/jangonera/.gradle/caches/transforms-3/31d124a7cd8ba916f4f23c0cd71dc755/transformed/checkout-sdk-3ds-android-2.0.4-runtime.jar:com/checkout/eventlogger/R.class diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 08e15d1..0084c9f 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -47,6 +47,18 @@ -dontwarn org.openjsse.** -dontwarn com.google.errorprone.annotations.Immutable -dontwarn d.a.c.** + +#Note:This is warning class being exposed from the checkout 3DS SDK and its known issue. We are adding dontwanr class rules +# in 3DS SDK because it is not necessary to expose to merchant who use 3DS SDK. However, currently workaround of adding missing rules in proguard able to resolve missing class rules compile error +-dontwarn b.a.c.g.b +-dontwarn b.a.c.g.f +-dontwarn b.a.c.g.k$a +-dontwarn b.a.c.g.k$b +-dontwarn b.a.c.g.o +-dontwarn b.a.c.g.p +-dontwarn b.a.c.g.t +-dontwarn b.a.c.l.a +-dontwarn com.checkout.sessions.data.mapper.KeyMapper # #-dontwarn com.google.errorprone.annotations.Immutable #-dontwarn d.a.c.g.b From cbc2f00981f8777be54f3b94db431c71ae352e23 Mon Sep 17 00:00:00 2001 From: Chintan Soni Date: Fri, 5 May 2023 17:37:50 +0100 Subject: [PATCH 2/5] 3.0.1-testonly-03 test --- app/build.gradle | 9 ++++++--- app/proguard-rules.pro | 28 +++++++++++++++++++--------- build.gradle | 8 ++++++-- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3be7768..e61f715 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -49,6 +49,10 @@ android { excludes += '/META-INF/{AL2.0,LGPL2.1}' } } + + configurations.configureEach { + resolutionStrategy { cacheChangingModulesFor 0, 'seconds' } + } } dependencies { @@ -71,8 +75,7 @@ dependencies { // Zowie 0.1.1 has incorrect obfuscation strategy (default, consecutive alphabet letters, no package, no prefix) // The problem is fixed in zowie 0.1.2 - implementation 'ai.zowie:android-sdk:0.1.1' -// implementation 'ai.zowie:android-sdk:0.1.2' + implementation 'ai.zowie:android-sdk:0.1.2' // When checkout 3ds is added to the project together with ai.zowie:0.1.1, we have the following error: // Duplicate class a.a found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) @@ -86,7 +89,7 @@ dependencies { // Duplicate class f.c found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) // Duplicate class g.a found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) // Duplicate class g.b found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) - implementation 'com.checkout:checkout-sdk-3ds-android:3.0.1-testonly-01' + implementation 'com.checkout:checkout-sdk-3ds-android:3.0.1-testonly-03' // when frames is added to the project together with checkout 3ds, we have the following error: // Type com.checkout.eventlogger.R is defined multiple times: /Users/jangonera/projekty/poligon/checkoutminify/app/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/debug/R.jar:com/checkout/eventlogger/R.class, /Users/jangonera/.gradle/caches/transforms-3/31d124a7cd8ba916f4f23c0cd71dc755/transformed/checkout-sdk-3ds-android-2.0.4-runtime.jar:com/checkout/eventlogger/R.class diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 0084c9f..9fb7036 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -50,15 +50,25 @@ #Note:This is warning class being exposed from the checkout 3DS SDK and its known issue. We are adding dontwanr class rules # in 3DS SDK because it is not necessary to expose to merchant who use 3DS SDK. However, currently workaround of adding missing rules in proguard able to resolve missing class rules compile error --dontwarn b.a.c.g.b --dontwarn b.a.c.g.f --dontwarn b.a.c.g.k$a --dontwarn b.a.c.g.k$b --dontwarn b.a.c.g.o --dontwarn b.a.c.g.p --dontwarn b.a.c.g.t --dontwarn b.a.c.l.a --dontwarn com.checkout.sessions.data.mapper.KeyMapper +#-dontwarn b.a.c.g.b +#-dontwarn b.a.c.g.f +#-dontwarn b.a.c.g.k$a +#-dontwarn b.a.c.g.k$b +#-dontwarn b.a.c.g.o +#-dontwarn b.a.c.g.p +#-dontwarn b.a.c.g.t +#-dontwarn b.a.c.l.a +-dontwarn com.cko.threedsobfuscation.d2 +-dontwarn com.cko.threedsobfuscation.i2$a +-dontwarn com.cko.threedsobfuscation.m2 +-dontwarn com.cko.threedsobfuscation.n2 +-dontwarn com.cko.threedsobfuscation.q7 +-dontwarn com.cko.threedsobfuscation.r2 +-dontwarn com.cko.threedsobfuscation.z1 +-dontwarn com.cko.threedsobfuscation.g6 +-dontwarn com.cko.threedsobfuscation.f6 +-dontwarn com.cko.threedsobfuscation.f6.a +-dontwarn com.cko.threedsobfuscation.i2$b # #-dontwarn com.google.errorprone.annotations.Immutable #-dontwarn d.a.c.g.b diff --git a/build.gradle b/build.gradle index dabac3a..4ebaa69 100644 --- a/build.gradle +++ b/build.gradle @@ -11,10 +11,14 @@ allprojects { maven { url = uri("https://maven.pkg.github.com/checkout/checkout-3ds-sdk-android") credentials { - username = githubTokenUserName - password = githubToken + username = "usernameo" + password = "token" + // Please add permission for write packages while creating token } } + maven { + url = uri("https://oss.sonatype.org/content/repositories/snapshots/") + } maven { url 'https://jitpack.io' } maven { url "https://zowie.jfrog.io/artifactory/zowie-android-sdk" From eb6371b45140b1f8c05de945d40f9bcefe48b623 Mon Sep 17 00:00:00 2001 From: Chintan Soni Date: Wed, 10 May 2023 10:43:19 +0100 Subject: [PATCH 3/5] 3DS SDK 3.0.1-testonly-05 version added --- app/build.gradle | 4 ++-- app/proguard-rules.pro | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index e61f715..34a1af9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -89,10 +89,10 @@ dependencies { // Duplicate class f.c found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) // Duplicate class g.a found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) // Duplicate class g.b found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) - implementation 'com.checkout:checkout-sdk-3ds-android:3.0.1-testonly-03' + implementation 'com.checkout:checkout-sdk-3ds-android:3.0.1-testonly-05' // when frames is added to the project together with checkout 3ds, we have the following error: // Type com.checkout.eventlogger.R is defined multiple times: /Users/jangonera/projekty/poligon/checkoutminify/app/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/debug/R.jar:com/checkout/eventlogger/R.class, /Users/jangonera/.gradle/caches/transforms-3/31d124a7cd8ba916f4f23c0cd71dc755/transformed/checkout-sdk-3ds-android-2.0.4-runtime.jar:com/checkout/eventlogger/R.class -// implementation 'com.github.checkout:frames-android:4.0.1' + implementation 'com.github.checkout:frames-android:4.0.2' } \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 9fb7036..9ebe069 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -69,6 +69,14 @@ -dontwarn com.cko.threedsobfuscation.f6 -dontwarn com.cko.threedsobfuscation.f6.a -dontwarn com.cko.threedsobfuscation.i2$b +-dontwarn com.cko.threedsobfuscation.a2$a +-dontwarn com.cko.threedsobfuscation.a2$b +-dontwarn com.cko.threedsobfuscation.e2 +-dontwarn com.cko.threedsobfuscation.f2 +-dontwarn com.cko.threedsobfuscation.i7 +-dontwarn com.cko.threedsobfuscation.j2 +-dontwarn com.cko.threedsobfuscation.r1 +-dontwarn com.cko.threedsobfuscation.v1 # #-dontwarn com.google.errorprone.annotations.Immutable #-dontwarn d.a.c.g.b From ba5cb19110d586a285375cff4657ff0418d9aeaa Mon Sep 17 00:00:00 2001 From: Chintan Soni Date: Wed, 10 May 2023 16:14:56 +0100 Subject: [PATCH 4/5] 3DS SDK 3.0.1-testonly-07 version added --- app/build.gradle | 6 +-- app/proguard-rules.pro | 95 ------------------------------------------ 2 files changed, 1 insertion(+), 100 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 34a1af9..ad75483 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -49,10 +49,6 @@ android { excludes += '/META-INF/{AL2.0,LGPL2.1}' } } - - configurations.configureEach { - resolutionStrategy { cacheChangingModulesFor 0, 'seconds' } - } } dependencies { @@ -89,7 +85,7 @@ dependencies { // Duplicate class f.c found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) // Duplicate class g.a found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) // Duplicate class g.b found in modules android-sdk-0.1.1-runtime (ai.zowie:android-sdk:0.1.1) and checkout-sdk-3ds-android-2.0.4-runtime (com.checkout:checkout-sdk-3ds-android:2.0.4) - implementation 'com.checkout:checkout-sdk-3ds-android:3.0.1-testonly-05' + implementation 'com.checkout:checkout-sdk-3ds-android:3.0.1-testonly-07' // when frames is added to the project together with checkout 3ds, we have the following error: // Type com.checkout.eventlogger.R is defined multiple times: /Users/jangonera/projekty/poligon/checkoutminify/app/build/intermediates/compile_and_runtime_not_namespaced_r_class_jar/debug/R.jar:com/checkout/eventlogger/R.class, /Users/jangonera/.gradle/caches/transforms-3/31d124a7cd8ba916f4f23c0cd71dc755/transformed/checkout-sdk-3ds-android-2.0.4-runtime.jar:com/checkout/eventlogger/R.class diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 9ebe069..e69de29 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,95 +0,0 @@ --keepclassmembers,allowoptimization enum * { - public static **[] values(); - public static ** valueOf(java.lang.String); -} --keepclassmembers class * implements java.io.Serializable { - static final long serialVersionUID; - private static final java.io.ObjectStreamField[] serialPersistentFields; - private void writeObject(java.io.ObjectOutputStream); - private void readObject(java.io.ObjectInputStream); - java.lang.Object writeReplace(); - java.lang.Object readResolve(); -} - -# remove runtime assertions, they are enforced in compile-time by Kotlin compiler --assumenosideeffects class kotlin.jvm.internal.Intrinsics { - public static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String); - public static void checkFieldIsNotNull(java.lang.Object, java.lang.String); - public static void checkFieldIsNotNull(java.lang.Object, java.lang.String, java.lang.String); - public static void checkNotNull(java.lang.Object); - public static void checkNotNull(java.lang.Object, java.lang.String); - public static void checkNotNullExpressionValue(java.lang.Object, java.lang.String); - public static void checkNotNullParameter(java.lang.Object, java.lang.String); - public static void checkParameterIsNotNull(java.lang.Object, java.lang.String); - public static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String); - public static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String, java.lang.String); - public static void throwUninitializedPropertyAccessException(java.lang.String); -} - -### remove logs ### --assumenosideeffects class android.util.Log { - public static *** d(...); - public static *** w(...); - public static *** v(...); - public static *** i(...); - public static *** e(...); - public static *** wtf(...); -} --keep class com.google.errorprone.annotations.Immutable --keep class org.conscrypt.** {*; } --keep class org.conscrypt.** {*; } --keep class org.conscrypt.** {*; } --keep class org.openjsse.** {*; } --keep class org.openjsse.** {*; } --keep class org.openjsse.** {*; } --dontwarn org.conscrypt.** --dontwarn org.bouncycastle.** --dontwarn org.openjsse.** --dontwarn com.google.errorprone.annotations.Immutable --dontwarn d.a.c.** - -#Note:This is warning class being exposed from the checkout 3DS SDK and its known issue. We are adding dontwanr class rules -# in 3DS SDK because it is not necessary to expose to merchant who use 3DS SDK. However, currently workaround of adding missing rules in proguard able to resolve missing class rules compile error -#-dontwarn b.a.c.g.b -#-dontwarn b.a.c.g.f -#-dontwarn b.a.c.g.k$a -#-dontwarn b.a.c.g.k$b -#-dontwarn b.a.c.g.o -#-dontwarn b.a.c.g.p -#-dontwarn b.a.c.g.t -#-dontwarn b.a.c.l.a --dontwarn com.cko.threedsobfuscation.d2 --dontwarn com.cko.threedsobfuscation.i2$a --dontwarn com.cko.threedsobfuscation.m2 --dontwarn com.cko.threedsobfuscation.n2 --dontwarn com.cko.threedsobfuscation.q7 --dontwarn com.cko.threedsobfuscation.r2 --dontwarn com.cko.threedsobfuscation.z1 --dontwarn com.cko.threedsobfuscation.g6 --dontwarn com.cko.threedsobfuscation.f6 --dontwarn com.cko.threedsobfuscation.f6.a --dontwarn com.cko.threedsobfuscation.i2$b --dontwarn com.cko.threedsobfuscation.a2$a --dontwarn com.cko.threedsobfuscation.a2$b --dontwarn com.cko.threedsobfuscation.e2 --dontwarn com.cko.threedsobfuscation.f2 --dontwarn com.cko.threedsobfuscation.i7 --dontwarn com.cko.threedsobfuscation.j2 --dontwarn com.cko.threedsobfuscation.r1 --dontwarn com.cko.threedsobfuscation.v1 -# -#-dontwarn com.google.errorprone.annotations.Immutable -#-dontwarn d.a.c.g.b -#-dontwarn d.a.c.g.f -#-dontwarn d.a.c.g.k$a -#-dontwarn d.a.c.g.k$b -#-dontwarn d.a.c.g.o -#-dontwarn d.a.c.g.p -#-dontwarn d.a.c.g.t -#-dontwarn d.a.c.l.a -#-dontwarn org.conscrypt.Conscrypt$Version -#-dontwarn org.conscrypt.Conscrypt -#-dontwarn org.conscrypt.ConscryptHostnameVerifier -#-dontwarn org.openjsse.javax.net.ssl.SSLParameters -#-dontwarn org.openjsse.javax.net.ssl.SSLSocket -#-dontwarn org.openjsse.net.ssl.OpenJSSE \ No newline at end of file From 62d893b9ca5bb5fba502c2d77a0c0f669d94ee5e Mon Sep 17 00:00:00 2001 From: Chintan Soni Date: Wed, 10 May 2023 16:28:45 +0100 Subject: [PATCH 5/5] removed test credentials and url --- build.gradle | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 4ebaa69..d03df87 100644 --- a/build.gradle +++ b/build.gradle @@ -7,18 +7,16 @@ plugins { allprojects { repositories { mavenCentral() + mavenLocal() google() maven { url = uri("https://maven.pkg.github.com/checkout/checkout-3ds-sdk-android") credentials { - username = "usernameo" + username = "username" password = "token" // Please add permission for write packages while creating token } } - maven { - url = uri("https://oss.sonatype.org/content/repositories/snapshots/") - } maven { url 'https://jitpack.io' } maven { url "https://zowie.jfrog.io/artifactory/zowie-android-sdk"