90 lines
3.3 KiB
Kotlin
90 lines
3.3 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
id("org.jetbrains.kotlin.plugin.compose")
|
|
}
|
|
android {
|
|
namespace = "de.ody"
|
|
compileSdk = 36
|
|
defaultConfig {
|
|
applicationId = "de.ody"
|
|
minSdk = 28
|
|
targetSdk = 36
|
|
versionCode = 4
|
|
versionName = "0.4.0"
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
signingConfigs {
|
|
create("release") {
|
|
// debug.keystore als stabiler Signing-Key für Diagnose-Builds
|
|
// Für Production-Release: ODY_KEYSTORE_PATH / ODY_KEYSTORE_PASSWORD setzen
|
|
val customKeystorePath = System.getenv("ODY_KEYSTORE_PATH")
|
|
val debugKeystorePath = System.getProperty("user.home") + "/.android/debug.keystore"
|
|
val keystoreFile = if (customKeystorePath != null) file(customKeystorePath) else file(debugKeystorePath)
|
|
storeFile = keystoreFile
|
|
storePassword = System.getenv("ODY_KEYSTORE_PASSWORD") ?: "android"
|
|
keyAlias = System.getenv("ODY_KEY_ALIAS") ?: "androiddebugkey"
|
|
keyPassword = System.getenv("ODY_KEY_PASSWORD") ?: "android"
|
|
}
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
buildConfig = true
|
|
}
|
|
buildTypes {
|
|
getByName("debug") {
|
|
buildConfigField("Boolean", "IS_DEBUG_BUILD", "true")
|
|
buildConfigField("Boolean", "IS_AUTARK", "true")
|
|
}
|
|
getByName("release") {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
isDebuggable = false
|
|
buildConfigField("Boolean", "IS_DEBUG_BUILD", "false")
|
|
buildConfigField("Boolean", "IS_AUTARK", "true")
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
signingConfig = signingConfigs.getByName("release")
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
|
|
}
|
|
}
|
|
sourceSets {
|
|
getByName("main").java.srcDirs("src/main/java")
|
|
}
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
}
|
|
dependencies {
|
|
// Compose BOM
|
|
implementation(platform("androidx.compose:compose-bom:2025.05.01"))
|
|
implementation("androidx.compose.material3:material3")
|
|
implementation("androidx.activity:activity-compose:1.10.1")
|
|
implementation("androidx.compose.material:material-icons-extended")
|
|
// llama.cpp für Android — echte lokale GGUF-Inferenz (ODY 0.2)
|
|
implementation("io.github.ljcamargo:llamacpp-kotlin:0.4.0")
|
|
// Coroutines
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.11.0")
|
|
configurations.configureEach {
|
|
resolutionStrategy {
|
|
force("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.11.0")
|
|
force("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0")
|
|
}
|
|
}
|
|
// Tests
|
|
testImplementation("junit:junit:4.13.2")
|
|
androidTestImplementation("androidx.test.ext:junit:1.2.1")
|
|
}
|