Installation
This is purely for 3rd party app integrations using the Production environment
You will need to add mavenCentral
and build info extractor to your gradle dependencies in your build.gradle -> buildscript{}
repositories {
+mavenCentral()
}
depedencies {
+classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"
}
Also you will need to add the remote repository (maven url) to your gradle dependencies in your build.gradle -> allprojects{}
allprojects {
repositories {
mavenCentral()
// Include the Payments SDK (related dependencies)
+maven { url 'https://yocotechnologies.jfrog.io/artifactory/public/' }
}
}
At the end of the file apply artifactory plugin
apply plugin: "com.jfrog.artifactory"
Add the dependency to a module that will be using the SDK:
Integrators (3rd Parties)
implementation 'com.yoco:payment-ui:<version>'
Additional Setup
The PaymentsSDK uses the Data Binding Library and therefore requires any module using the library to enable data binding.
More info can be found here: https://developer.android.com/jetpack/androidx/releases/databinding
android {
...
// Using Gradle Version < 4.0.0
// dataBinding {
// enabled = true
// }
// Using Gradle Version > 4.0.0
buildFeatures {
dataBinding true
}
}
Proguard Setup
If your project uses proguard for minification and obfuscation then add below rules to your proguard file
# Material Library (Used by PaymentsSDK)
-keep class com.google.android.material.** { *; }
-keep @kotlinx.serialization.Serializable class *
# Koin workmanager
-keep class com.birbit.android.jobqueue.** { *; }
-dontwarn com.birbit.android.jobqueue.scheduling.Gcm*
-dontwarn com.google.android.material.**
-dontnote com.google.android.material.**
-keep class com.yoco.ono.common.miura.** { *; }
-keep class com.yoco.ono.android.miura.** { *; }
-keep class com.yoco.ono.common.dspread.** { *; }
-keep class com.yoco.ono.android.dspread.** { *; }
-keep class com.yoco.ono.common.datecs.** { *; }
-keep class com.yoco.ono.android.datecs.** { *; }
-keep class com.yoco.ono.common.bluetooth.** { *; }
-keep class com.yoco.ono.android.bluetooth.** { *; }
-keep class com.yoco.ono.common.cloud.** { *; }
-keep class com.yoco.ono.android.cloud.** { *; }
-keep class com.yoco.ono.common.modules.sdk.models.** { *; }
-keep class com.yoco.ono.android.modules.** { *; }
Sync the project, then if successful the dependency would have been downloaded and you should be ready to go!