Gradle (Android)
Add NCKit to your Android app from Maven. The sample app uses a version catalog:
[versions]
nckit = "1.2.0"
[libraries]
nckit = { module = "com.5exceptions:nckit", version.ref = "nckit" }
dependencies {
implementation(libs.nckit)
}
Maven: groupId com.5exceptions, artifactId nckit, version 1.2.0
Source: 5Exceptions-Mobile-Team/NCKit_Android
Kotlin imports use package com.fiveexceptions.nckit (unchanged).
Requirementsโ
| Requirement | Value |
|---|---|
| Android | API 26 (Android 8.0 Oreo) |
| compileSdk | 36 |
| Kotlin | 2.4.10 (AGP 9 built-in Kotlin) |
| Android Gradle Plugin | 9.3.1 |
| Gradle Wrapper | 9.6.1 |
| JDK | 17+ (including JVM 25) |
| Library bytecode | Java 17 |
| Architectures | arm64-v8a, armeabi-v7a, x86_64 |
1. Add dependencyโ
In the version catalog and the app module, as above. Without a catalog, the app module can depend on the coordinate directly:
dependencies {
implementation("com.5exceptions:nckit:1.2.0")
}
2. Repositoriesโ
NCKit resolves from Maven Central (or your project's default Maven repositories). In settings.gradle.kts:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
}
3. ABI filters (optional)โ
Ensure defaultConfig includes all supported ABIs:
android {
defaultConfig {
ndk {
abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86_64")
}
}
}
4. Sync and verifyโ
./gradlew :app:assembleDebug
After sync:
-
import com.fiveexceptions.nckit.NCKitProcessorresolves - App builds for arm64-v8a device
- Emulator build succeeds on x86_64 if you use the emulator ABI
ProGuard / R8โ
NCKit ships these consumer ProGuard rules in the AAR. App rules only need to repeat them if a custom configuration drops the AAR file:
-keep class com.fiveexceptions.nckit.* {
public protected *;
}
-keep class com.fiveexceptions.nckit.NCKitProcessor {
private native <methods>;
}
Maven coordinatesโ
| Field | Value |
|---|---|
groupId | com.5exceptions |
artifactId | nckit |
version | 1.2.0 |
Sample appโ
git clone https://github.com/5Exceptions-Mobile-Team/Nckit_Android_Sample_App.git
See Sample App.
Next stepsโ
โ How to Use โ Kotlin file denoise example
โ Sample App โ full Android reference project
โ Requirements โ Android API & ABI details