66 lines
1.7 KiB
Kotlin
66 lines
1.7 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
}
|
|
|
|
android {
|
|
namespace = "monster.autisme.tsjetpiti"
|
|
compileSdk = 35
|
|
|
|
// NDK is needed to compile the llama.cpp JNI bridge. Android Studio will
|
|
// offer to install this exact version; adjust if you have a different one.
|
|
ndkVersion = "27.2.12479018"
|
|
|
|
defaultConfig {
|
|
applicationId = "monster.autisme.tsjetpiti"
|
|
minSdk = 30
|
|
targetSdk = 35
|
|
versionCode = 2
|
|
versionName = "0.1.1"
|
|
|
|
// On-device LLM => 64-bit ARM only. Keeps the APK from ballooning.
|
|
ndk {
|
|
abiFilters += "arm64-v8a"
|
|
}
|
|
externalNativeBuild {
|
|
cmake {
|
|
// Force an optimized native build even for the debug APK — otherwise
|
|
// AGP compiles ggml/llama at -O0 and inference is ~10x too slow.
|
|
arguments += "-DANDROID_STL=c++_shared"
|
|
arguments += "-DCMAKE_BUILD_TYPE=Release"
|
|
cppFlags += "-std=c++17"
|
|
}
|
|
}
|
|
}
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
path = file("src/main/cpp/CMakeLists.txt")
|
|
version = "3.22.1"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// Intentionally dependency-free: framework WebView + org.json + native lib.
|
|
}
|