a11d67cf70
Cliente móvil nativo: embebe un peer real del bus (unibus.aar), de modo que el cifrado E2E y el transporte NATS corren en el dispositivo. - Conexión: Host (control plane) + NATS (data plane) + identidad; defaults 10.0.2.2 para el emulador, configurables (sin IPs hardcodeadas). - BusViewModel: llamadas de red del binding en Dispatchers.IO; los frames entrantes (FrameListener.onFrame, hilo NATS) se publican en un StateFlow thread-safe que Compose recolecta en el hilo principal. - Chat: crear/unir room (toggle cifrado), enviar, recibir. - El .aar es artefacto (gitignored); se regenera con gomobile bind (README). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
67 lines
1.9 KiB
Kotlin
67 lines
1.9 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
id("org.jetbrains.kotlin.plugin.compose")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.unibus.app"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
applicationId = "com.unibus.app"
|
|
minSdk = 21
|
|
targetSdk = 34
|
|
versionCode = 1
|
|
versionName = "0.1.0"
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
|
|
buildTypes {
|
|
getByName("release") {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro",
|
|
)
|
|
}
|
|
}
|
|
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// The unibus gomobile binding: a real bus peer that does NATS + E2E crypto
|
|
// on the device. All protocol logic lives here, shared with every other peer.
|
|
implementation(files("libs/unibus.aar"))
|
|
|
|
val composeBom = platform("androidx.compose:compose-bom:2024.09.03")
|
|
implementation(composeBom)
|
|
implementation("androidx.compose.ui:ui")
|
|
implementation("androidx.compose.ui:ui-graphics")
|
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
implementation("androidx.compose.material3:material3")
|
|
implementation("androidx.compose.material:material-icons-extended")
|
|
implementation("androidx.activity:activity-compose:1.9.2")
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.6")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.6")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1")
|
|
|
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
|
}
|