5af945778b
App Android Material 3, tema oscuro con acento índigo/violeta que replica el look & feel de la app web (web/src): - Login: identidad + contraseña, candado de marca, estilo Card. - Lista de rooms: avatar+handle, buscador rooms/usuarios/mensajes, items con candado (E2E) / hash (cleartext), hora, último mensaje y badge de no leídos. - Chat estilo Element: avatar+nombre+hora+texto, composer redondeado con send. Arquitectura por capas: UnibusRepository aísla la UI de la fuente de datos. MockUnibusRepository (en memoria) alimenta la iteración de diseño; BindingUnibusRepository implementa la misma interfaz sobre el binding gomobile (unibus.aar) para conectar el bus real sin tocar las pantallas. AppViewModel orquesta el estado; navegación por estado (login -> rooms -> chat), KISS. Build: ./gradlew assembleDebug (AGP 8.5.2, Gradle 8.7, Kotlin 1.9.24, Compose BOM 2024.06.00, compileSdk 34, minSdk 21). El .aar se regenera con mobile/gen_aar.sh (no se versiona, 38MB). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
76 lines
2.3 KiB
Kotlin
76 lines
2.3 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
id("org.jetbrains.kotlin.plugin.serialization")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.unibus.app"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
applicationId = "com.unibus.app"
|
|
minSdk = 21
|
|
targetSdk = 34
|
|
versionCode = 1
|
|
versionName = "0.1.0"
|
|
// The unibus.aar ships native libgojni.so for these ABIs. Limit the APK
|
|
// to the desktop/emulator + phone ABIs we actually target.
|
|
ndk {
|
|
abiFilters += listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64")
|
|
}
|
|
}
|
|
|
|
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"
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
composeOptions {
|
|
// Compose compiler matching Kotlin 1.9.24.
|
|
kotlinCompilerExtensionVersion = "1.5.14"
|
|
}
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// gomobile binding over pkg/client (real end-to-end crypto on device).
|
|
implementation(files("libs/unibus.aar"))
|
|
|
|
implementation("androidx.core:core-ktx:1.13.1")
|
|
implementation("androidx.activity:activity-compose:1.9.0")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.2")
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.2")
|
|
|
|
val composeBom = platform("androidx.compose:compose-bom:2024.06.00")
|
|
implementation(composeBom)
|
|
implementation("androidx.compose.ui:ui")
|
|
implementation("androidx.compose.ui:ui-graphics")
|
|
implementation("androidx.compose.material3:material3")
|
|
implementation("androidx.compose.material:material-icons-extended")
|
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1")
|
|
}
|