Setup & Requirement
Project Setup
To integrate the MineSec Headless SDK into your Android project, ensure your development environment meets the following requirements:
Item | Required | Recommend | Remarks |
---|---|---|---|
Project SDK (Java) | 1.8 | 17 | |
Android Target SDK | 34+ | 35 | Start from Aug, 2024, App published on Play Store is required to target API level 35. Link to Play Store Docs (opens in a new tab) |
Android Min SDK | 26 | n/a | |
Android Gradle Plugin (AGP) | 8.1.1+ | 8.6.0 | Target API level 34: AGP 8.1.1; Target API level 35: AGP 8.6.0, Link to Android Docs (opens in a new tab) |
Android Kotlin Plugin | 1.9.0+ | 1.9.25 |
Sample build gradle files
Below is a sample project's build.gradle.kts
file to help you set up your project with the necessary configurations:
Project's build.gradle.kts
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.1.1" apply false
kotlin("android") version "1.9.0" apply false
}
App's build.gradle.kts
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}
android {
namespace = "com.theminesec.example.myapplication"
compileSdk = 34
defaultConfig {
applicationId = "com.theminesec.example.myapplication"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
packagingOptions {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
excludes += "/META-INF/DEPENDENCIES"
excludes += "/META-INF/LICENSE"
excludes += "/META-INF/LICENSE.txt"
excludes += "/META-INF/license.txt"
excludes += "/META-INF/NOTICE"
excludes += "/META-INF/NOTICE.txt"
excludes += "/META-INF/notice.txt"
excludes += "/META-INF/ASL2.0"
excludes += "/META-INF/*.kotlin_module"
}
}
}
dependencies {
//... other deps
// MineSec
debugImplementation("com.theminesec.sdk:headless-stage:1.2.0")
releaseImplementation("com.theminesec.sdk:headless:1.2.0")
}