Installation
Prerequisites
MineSec Pay 7 3.0.30 is built and tested with the toolchain below. Use the same versions, or later ones, in your project.
| Requirement | Version |
|---|---|
| Android Gradle Plugin | 8.11.1 |
| Gradle | 8.13 |
| Kotlin | 2.2.0 |
| Compose Multiplatform | 1.9.3 (Material 3 1.9.0) |
| JDK | 17 |
| Minimum SDK | API 30 (Android 11) |
| Compile SDK / Target SDK | API 36 |
Note:
msa-coreandmsa-uikitdeclareminSdk29, but the Embedded Payment SDK they bring in declaresminSdk30. Set your app'sminSdkto 30. A lower value fails the manifest merge. See also the device requirements.
Step 1: Configure Maven Repositories
The libraries are hosted on MineSec's GitHub Package Registry. Add your credentials to your global
~/.gradle/gradle.properties, not to the project's own file:
GITHUB_USERNAME=your-github-username
GITHUB_TOKEN=your-github-tokenThen add the registry in settings.gradle.kts:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
val githubUsername = providers.gradleProperty("GITHUB_USERNAME").orNull
val githubToken = providers.gradleProperty("GITHUB_TOKEN").orNull
maven {
name = "MineSecMavenClientRegistry"
url = uri("https://maven.pkg.github.com/theminesec/ms-registry-client")
credentials {
username = githubUsername
password = githubToken
}
}
}
}Step 2: Add Version Catalog Entries
The libraries ship as one versioned set. msa-uikit depends on msa-core of the same version, so you declare only
msa-uikit:
[versions]
msa = "3.0.30"
[libraries]
msa-uikit-stage = { module = "com.theminesec.multiplatform:msa-uikit-stage", version.ref = "msa" }
msa-uikit-prod = { module = "com.theminesec.multiplatform:msa-uikit", version.ref = "msa" }| Artifact | Channel | Brings in |
|---|---|---|
msa-uikit-stage | Staging (UAT) | msa-core-stage and the staging Embedded Payment SDK (headless-mpoc-stage) |
msa-uikit | Production | msa-core and the production Embedded Payment SDK (headless-mpoc) |
You do not declare msa-core, the Embedded Payment SDK or Koin yourself. They come in transitively, at the versions
MineSec tested together.
Step 3: Add Dependencies
In your app-level build.gradle.kts, use the staging artifact for debug builds and the production artifact for
release builds:
android {
compileSdk = 36
defaultConfig {
minSdk = 30
targetSdk = 36
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
dependencies {
debugImplementation(libs.msa.uikit.stage)
releaseImplementation(libs.msa.uikit.prod)
}Apply the Compose compiler plugin (org.jetbrains.kotlin.plugin.compose, version 2.2.0) to the app module, as for
any Compose app.
Upgrading from msa-core 1.x: remove the separate
headless-mpocdependency, the Koin dependencies, and themsa-modelandslf4j-simpleexclusions. 3.0.30 needs none of them.
Step 4: Sync and Verify
Sync your project with Gradle, then check that both libraries resolve:
import com.theminesec.multiplatform.msa.MsaApp // msa-uikit
import com.theminesec.multiplatform.msa_core.acitivty.BaseMsaActivity // msa-coreIf both imports resolve, the installation is complete.
Next Steps
- Quickstart: set up your Application class and MainActivity, and replace your first screen
- Theming & Branding: change colours, fonts, logos and sizes