Dependency manager
Add following lines into build.gradle file:
2 maven {
url "https://jitpack.io" }
2 compile 'com.github.wirecard:paymentSDK-Android:2.1.0' For version without card scanner(card-io) feature use:
2 compile 'com.github.wirecard:paymentSDK-Android:2.1.0-cardScannerDisabled'
Manual
In Android Studio, go to: File -> New -> New Module -> Import .JAR/.AAR Package
Import AAR
Now you need to add this module as dependency to your build.gradle as shown below:
3 compile project(
':paymentsdk')
Dependencies
SDK Uses following external libraries, you need to include them in your build.gradle file as shown below:
3 compile 'com.android.support:appcompat-v7:24.1.1' 4 compile 'io.card:android-sdk:5.4.0' //
not necessary for version without card scanner feature 5 compile 'com.squareup.okhttp3:logging-interceptor:3.4.1' 6 compile 'com.squareup.retrofit2:retrofit:2.1.0' 7 compile 'com.squareup.retrofit2:converter-gson:2.1.0' 8 compile(
'com.squareup.retrofit2:converter-simplexml:2.1.0') {
10 exclude module: 'stax-api' 11 exclude module: 'xpp3'
Proguard
If you are using proguard, please add following rules into your proguard-rules.pro file:
1 -dontwarn org.simpleframework.**
6 -dontwarn de.wirecard.paymentsdk.**
8 -keepattributes Signature
9 -keepattributes Exceptions
10 -keepattributes JavascriptInterface
11 -keepattributes *Annotation*
13 -keep class org.simpleframework.** { *; }
14 -keep interface org.simpleframework.** { *; }
16 -keep class okhttp3.** { *;}
18 -keep class okio.** { *; }
19 -keep interface okio.** { *; }
21 -keep class retrofit2.** { *; }
23 -keep class io.card.**
24 -keepclassmembers class io.card.** {
28 -keep class de.wirecard.paymentsdk.** { *; }
29 -keep interface de.wirecard.paymentsdk.** { *; }