Use zigbee2mqtt scenes directly, persist last selected scene locally

This commit is contained in:
Reinout Meliesie 2024-08-01 00:36:05 +02:00
commit ac8fa6f0c0
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6
11 changed files with 163 additions and 182 deletions

View file

@ -1,3 +1,10 @@
import java.io.FileInputStream
import java.util.Properties
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val keystoreProperties = Properties ()
keystoreProperties . load ( FileInputStream ( rootProject . file ("keystore.properties") ) )
plugins {
alias ( libs . plugins . android . application )
alias ( libs . plugins . kotlin . android )
@ -17,10 +24,23 @@ android {
versionName = "1.0"
}
signingConfigs {
create ("kernelmaft") {
keyAlias = "kernelmaft"
keyPassword = keystoreProperties ["keyPassword"] as String
storeFile = file ( keystoreProperties ["storeFile"] as String )
storePassword = keystoreProperties ["storePassword"] as String
}
}
buildTypes {
debug {
signingConfig = signingConfigs . getByName ("kernelmaft")
}
release {
isMinifyEnabled = true
isShrinkResources = true
signingConfig = signingConfigs . getByName ("kernelmaft")
}
}
compileOptions {
@ -47,6 +67,7 @@ dependencies {
implementation ( libs . androidx . compose . ui )
implementation ( libs . androidx . compose . ui . graphics )
debugImplementation ( libs . androidx . compose . ui . tooling )
implementation ( libs . androidx . datastore . preferences )
implementation ( libs . androidx . lifecycle . runtime . ktx )
implementation ( libs . kotlinx . coroutines . android )
implementation ( libs . kotlinx . serialization . json )
@ -55,7 +76,7 @@ dependencies {
implementation ( libs . kmqtt . client )
}
tasks . withType ( org . jetbrains . kotlin . gradle . tasks . KotlinCompile :: class ) . all {
tasks . withType ( KotlinCompile :: class ) . all {
compilerOptions {
freeCompilerArgs . addAll ( "-opt-in=kotlin.ExperimentalUnsignedTypes" )
}