94 lines
3.0 KiB
Kotlin
94 lines
3.0 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.compose)
|
|
id("com.chaquo.python") // Apply it here
|
|
id("com.google.devtools.ksp") // Added for the Room Android database subsystem and libraries
|
|
}
|
|
|
|
chaquopy {
|
|
defaultConfig {
|
|
version = "3.11" // Python 3.11 is very stable for Android right now
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "net.mmanningau.alice"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "net.mmanningau.alice"
|
|
minSdk = 28
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
ndk {
|
|
abiFilters += listOf("arm64-v8a", "x86_64")
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
isCoreLibraryDesugaringEnabled = true
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
implementation(libs.androidx.compose.ui)
|
|
implementation(libs.androidx.compose.ui.graphics)
|
|
implementation(libs.androidx.compose.ui.tooling.preview)
|
|
implementation(libs.androidx.compose.material3)
|
|
testImplementation(libs.junit)
|
|
androidTestImplementation(libs.androidx.junit)
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
|
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
|
|
debugImplementation(libs.androidx.compose.ui.tooling)
|
|
debugImplementation(libs.androidx.compose.ui.test.manifest)
|
|
|
|
// LangChain4j BOM (Bill of Materials)
|
|
// This ensures all langchain4j modules use the same, compatible version.
|
|
implementation(platform("dev.langchain4j:langchain4j-bom:0.36.2"))
|
|
|
|
// Now, declare the modules you need without specifying the version.
|
|
implementation("dev.langchain4j:langchain4j")
|
|
implementation("dev.langchain4j:langchain4j-open-ai")
|
|
|
|
|
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
|
|
|
|
// Room Database for local chat history
|
|
implementation("androidx.room:room-runtime:2.6.1")
|
|
implementation("androidx.room:room-ktx:2.6.1")
|
|
ksp("androidx.room:room-compiler:2.6.1")
|
|
|
|
// Llama.cpp Kotlin Multiplatform Wrapper
|
|
implementation("com.llamatik:library:0.8.1")
|
|
|
|
// Extended Material Icons (for Download, CheckCircle, etc.)
|
|
implementation("androidx.compose.material:material-icons-extended")
|
|
} |