On This Page
REST API
Configuring the Module build.gradle File
build.gradle
FileFollow these steps to configure your module
build.gradle
file.- In the Android section, add these exclusion rules to your module'sbuild.gradlefile.android { ... packaging { resources { excludes.add("META-INF/*") excludes.add("LICENSE.txt") excludes.add("asm-license.txt") } } }
- In order for the app to support Java 11 features, you must set the compatibility levels.android { ... compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } kotlinOptions { jvmTarget = "11" } }
- The Tap to Phone Android Solution library publishes a release build type only. The debug build type is not available, so set thematchingFallbacksfield value torelease.android { ... buildTypes { ... debug { matchingFallbacks.apply { clear() add("release") } } } }
- IMPORTANTThe repository contains the six latest SDK versions, which are updated continually. You cannot build a new version of your application using an outdated SDK version after it is removed from the repository. To ensure that you benefit from the latest features and enhancements, regularly update to the latest version of the SDK.Add the required Default UI and Tap to Phone libraries to the Dependencies section of your module'sbuild.gradlefile.dependencies { ... // This is the Default UI dependency implementation("io.payworks:paybutton-android:2.88.0") // This is the Tap to Phone dependency implementation("io.payworks:mpos.android.taptophone:2.88.0") }