Configure the Module
build.gradle
File

Follow these steps to configure your module
build.gradle
file.
  1. In the Android section, add these exclusion rules to your module's
    build.gradle
    file.
    android {     ...     packaging {         resources {             excludes.add("META-INF/*")             excludes.add("LICENSE.txt")             excludes.add("asm-license.txt")         }     } }
  2. In order for the app to support Java 17 features, you must set the compatibility levels.
    android {     ...     compileOptions {         sourceCompatibility = JavaVersion.VERSION_17         targetCompatibility = JavaVersion.VERSION_17     }     kotlinOptions {         jvmTarget = "17"     } }
  3. The PAX All-in-One Android Solution library publishes a release build type only. The debug build type is not available, so set the
    matchingFallbacks
    field value to
    release
    .
    android {     ...     buildTypes {         ...         debug {             matchingFallbacks.apply {                 clear()                 add("release")             }         }     } }
  4. Stay current with the latest SDK. The SDK repository is continuously updated to make available the six latest versions. When a new version is released, the oldest is removed and can no longer be used for new application builds. Establish a regular process for updating to the newest available SDK version to avoid potential build failures and to ensure that your application runs with the latest features, performance enhancements, and security updates.
    Add the required Default UI and PAX libraries to the dependencies section of your module's
    build.gradle
    file.
    dependencies {     ...     // This is the Default UI dependency     implementation("io.payworks:paybutton-android:2.105.0")        // This is the PAX dependency     implementation("io.payworks:mpos.android.accessories.pax:2.105.0")    }