forked from fritob/Camper-Monitor
Der Emulator hat kein Bluetooth. Damit sich die Ansichten trotzdem ansehen und durchklicken lassen, füttert ein Demo-Modus fertige Werte ein - dasselbe Vorgehen wie in der iOS-Fassung. Nur in Debug-Bauten und nur, wenn beim Start das Extra gesetzt ist: adb shell am start -n de.fritob.campermonitor/.MainActivity --ez demo true Im Demo-Modus funkt nichts und es wird nichts abgelegt; die echten Geräte und Fahrzeuge bleiben unberührt. Der Kühlbox-Zustand kommt dabei aus einem echten Einzonen-Datensatz, wie ihn die Box im Fahrzeug schickt - inklusive des Fühlerplatzhalters, damit die Anzeige auch im Demo zeigt, was sie im Fahrzeug zeigen würde. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
62 lines
1.7 KiB
Kotlin
62 lines
1.7 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
id("org.jetbrains.kotlin.plugin.compose")
|
|
}
|
|
|
|
android {
|
|
namespace = "de.fritob.campermonitor"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
applicationId = "de.fritob.campermonitor"
|
|
// Android 8: älter lohnt nicht, dort fehlt zu viel an Bluetooth LE.
|
|
minSdk = 26
|
|
targetSdk = 35
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
buildConfig = true
|
|
}
|
|
|
|
sourceSets["main"].java.srcDirs("src/main/kotlin")
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":protocol"))
|
|
|
|
val composeBom = platform("androidx.compose:compose-bom:2024.12.01")
|
|
implementation(composeBom)
|
|
implementation("androidx.compose.material3:material3")
|
|
implementation("androidx.compose.material:material-icons-extended")
|
|
implementation("androidx.compose.ui:ui")
|
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
|
|
|
implementation("androidx.core:core-ktx:1.15.0")
|
|
implementation("androidx.activity:activity-compose:1.9.3")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.7")
|
|
implementation("androidx.navigation:navigation-compose:2.8.5")
|
|
|
|
// Die Ablage der Geräte und Profile nutzt org.json aus Android selbst -
|
|
// eine weitere Bibliothek lohnt für eine Handvoll Felder nicht.
|
|
}
|