Installation
Maven repository
Add your private Maven endpoint (HTTPS or SFTP) and read credentials to settings.gradle.kts, inside the repositories block under dependencyResolutionManagement.
HTTPS (recommended):
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven {
name = "KlpSdk"
url = uri("https://maven.example-bank.com/repository/klp-releases/")
credentials {
username = providers.gradleProperty("klpMavenUser").get()
password = providers.gradleProperty("klpMavenPassword").get()
}
}
}
}SFTP (Gradle 8+):
maven {
name = "KlpSdkSftp"
url = uri("sftp://server.example.com:22/android/")
credentials {
username = providers.gradleProperty("klpMavenUser").get()
password = providers.gradleProperty("klpMavenPassword").get()
}
isAllowInsecureProtocol = true
}Do not commit credentials. Define klpMavenUser / klpMavenPassword in ~/.gradle/gradle.properties or CI secrets.
Gradle dependency
dependencies {
implementation("com.klp.sdk:klp-android-sdk:1.0.0")
}Centralize the version in gradle.properties:
klpSdkVersion=1.0.0implementation("com.klp.sdk:klp-android-sdk:${property("klpSdkVersion")}")Local module (development only)
When developing alongside SDK sources in the same workspace:
// settings.gradle.kts
include(":klp-sdk")
project(":klp-sdk").projectDir = file("sdk/klp-sdk")
// app/build.gradle.kts
dependencies {
implementation(project(":klp-sdk"))
}Do not use the Maven dependency and local module together.
Release AAR & R8
The published release AAR is built with R8: the public API, manifest components, WebView bridge, and JNI entry points are kept; internal logic is obfuscated.
When your app uses minifyEnabled true, the bundled consumer-rules.pro is merged automatically.
Request the version-specific mapping file from Kaizen for stack trace deobfuscation.
Updated about 2 months ago
