Deliverables
Nexus / Maven repository
Our Android packages (AAR files) are hosted in a public Nexus repository.
To enable fetching Switcloud packages and their dependencies, add the following Maven repository configuration to your project's settings.gradle.kts:
dependencyResolutionManagement {
...
repositories {
google()
mavenCentral()
maven {
url = uri("https://public-nexus.switstack.io/repository/switstack-mvn")
}
}
...
}
To integrate the switcloud-clt-kt package into your Android application, add the following line to the dependencies section of your build.gradle.kts file:
To integrate the switcloud-l2-kt package into your Android application, add the following line to the dependencies section of your build.gradle.kts file:
Dependencies
The switcloud-clt-kt package relies on the following components:
switcloud-api-ktfor communication with the Switcloud serverswitcloud-l2-ktfor managing the terminal's EMV L2 stack
Variants / Flavors
Hardware abstraction is automatically managed using a well-structured Gradle build variant system.
Note
See Android documentation about build-variants for more info.
This approach ensures that the correct version of switcloud-l2-kt, and if necessary, the appropriate moka variant, is automatically selected — removing the need for manual dependency management.
To support different hardware platforms, define a hardware dimension in your build.gradle.kts file:
android {
...
flavorDimensions += "l2"
productFlavors {
create("mokastd") {
dimension = "l2"
}
create("ingenico") {
dimension = "l2"
missingDimensionStrategy("hal", "std")
}
create("sunmi") {
dimension = "l2"
missingDimensionStrategy("hal", "std")
}
}
...
}
This setup enables three separate builds, each targeting a specific hardware platform. Gradle will automatically resolve the appropriate flavor of switcloud-l2-kt from the repository.