mirror of
https://github.com/home-assistant/android
synced 2024-09-06 17:23:32 +00:00
![Joris Pelgröm](/assets/img/avatar_default.png)
* Add location history (location, trigger, result) - Initial setup saving data, no UI, cleanup or preferences yet * On/off setting, limit history size and basic UI - Add a on/off setting for location history (default on) - Limit the history size to 48 hours, any older entries will be deleted during regular sensor updates - Add a basic UI for location history based on paging considering the possible data size with multiserver/high accuracy. The list looks good and shows status at a glance, detail view still needs work. * Finish expanded UI - Make the expanded UI nicer and show relevant data, buttons for opening the location in a maps app and sharing log data - Add empty states for location history * Filter by state, improve list speed - Add option to filter by state - Simplify Room configuration and sort by indexed ID to improve list loading speed * Remove duplicate source * Fix minimal * Split sent into sent and failed to send
201 lines
6 KiB
Plaintext
201 lines
6 KiB
Plaintext
import com.google.gms.googleservices.GoogleServicesPlugin.GoogleServicesPluginConfig
|
|
|
|
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.kapt)
|
|
alias(libs.plugins.kotlin.parcelize)
|
|
alias(libs.plugins.firebase.appdistribution)
|
|
alias(libs.plugins.google.services)
|
|
alias(libs.plugins.hilt)
|
|
}
|
|
|
|
android {
|
|
namespace = "io.homeassistant.companion.android"
|
|
|
|
compileSdk = libs.versions.androidSdk.compile.get().toInt()
|
|
|
|
ndkVersion = "21.3.6528147"
|
|
|
|
useLibrary("android.car")
|
|
|
|
defaultConfig {
|
|
applicationId = "io.homeassistant.companion.android"
|
|
minSdk = libs.versions.androidSdk.min.get().toInt()
|
|
targetSdk = libs.versions.androidSdk.target.get().toInt()
|
|
|
|
versionName = project.version.toString()
|
|
versionCode = System.getenv("VERSION_CODE")?.toIntOrNull() ?: 1
|
|
|
|
manifestPlaceholders["sentryRelease"] = "$applicationId@$versionName"
|
|
manifestPlaceholders["sentryDsn"] = System.getenv("SENTRY_DSN") ?: ""
|
|
|
|
bundle {
|
|
language {
|
|
enableSplit = false
|
|
}
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding = true
|
|
compose = true
|
|
}
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = libs.versions.javaVersion.get()
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility(libs.versions.javaVersion.get())
|
|
targetCompatibility(libs.versions.javaVersion.get())
|
|
}
|
|
|
|
firebaseAppDistribution {
|
|
serviceCredentialsFile = "firebaseAppDistributionServiceCredentialsFile.json"
|
|
releaseNotesFile = "./app/build/outputs/changelogBeta"
|
|
groups = "continuous-deployment"
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
storeFile = file(System.getenv("KEYSTORE_PATH") ?: "release_keystore.keystore")
|
|
storePassword = System.getenv("KEYSTORE_PASSWORD") ?: ""
|
|
keyAlias = System.getenv("KEYSTORE_ALIAS") ?: ""
|
|
keyPassword = System.getenv("KEYSTORE_ALIAS_PASSWORD") ?: ""
|
|
enableV1Signing = true
|
|
enableV2Signing = true
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
named("debug").configure {
|
|
applicationIdSuffix = ".debug"
|
|
}
|
|
named("release").configure {
|
|
isDebuggable = false
|
|
isJniDebuggable = false
|
|
signingConfig = signingConfigs.getByName("release")
|
|
}
|
|
}
|
|
flavorDimensions.add("version")
|
|
productFlavors {
|
|
create("minimal") {
|
|
applicationIdSuffix = ".minimal"
|
|
versionNameSuffix = "-minimal"
|
|
}
|
|
create("full") {
|
|
applicationIdSuffix = ""
|
|
versionNameSuffix = "-full"
|
|
}
|
|
|
|
// Generate a list of application ids into BuildConfig
|
|
val values = productFlavors.joinToString {
|
|
"\"${it.applicationId ?: defaultConfig.applicationId}${it.applicationIdSuffix}\""
|
|
}
|
|
|
|
defaultConfig.buildConfigField("String[]", "APPLICATION_IDS", "{$values}")
|
|
}
|
|
|
|
testOptions {
|
|
unitTests.isReturnDefaultValues = true
|
|
}
|
|
|
|
tasks.withType<Test>().configureEach {
|
|
useJUnitPlatform {
|
|
includeEngines("spek2")
|
|
}
|
|
}
|
|
|
|
lint {
|
|
abortOnError = false
|
|
disable += "MissingTranslation"
|
|
}
|
|
|
|
kapt {
|
|
correctErrorTypes = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":common"))
|
|
|
|
implementation(libs.blurView)
|
|
|
|
implementation(libs.kotlin.stdlib)
|
|
implementation(libs.kotlin.reflect)
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
"fullImplementation"(libs.kotlinx.coroutines.play.services)
|
|
|
|
implementation(libs.hilt.android)
|
|
kapt(libs.hilt.android.compiler)
|
|
|
|
implementation(libs.appcompat)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
implementation(libs.constraintlayout)
|
|
implementation(libs.recyclerview)
|
|
implementation(libs.preference.ktx)
|
|
implementation(libs.material)
|
|
implementation(libs.fragment.ktx)
|
|
|
|
implementation(libs.jackson.module.kotlin)
|
|
implementation(libs.okhttp)
|
|
implementation(libs.picasso)
|
|
|
|
"fullImplementation"(libs.play.services.location)
|
|
"fullImplementation"(libs.play.services.home)
|
|
"fullImplementation"(libs.play.services.threadnetwork)
|
|
"fullImplementation"(platform(libs.firebase.bom))
|
|
"fullImplementation"(libs.firebase.messaging)
|
|
"fullImplementation"(libs.sentry.android)
|
|
"fullImplementation"(libs.play.services.wearable)
|
|
"fullImplementation"(libs.wear.remote.interactions)
|
|
|
|
implementation(libs.biometric)
|
|
implementation(libs.webkit)
|
|
|
|
implementation(libs.bundles.media3)
|
|
"fullImplementation"(libs.media3.datasource.cronet)
|
|
"minimalImplementation"(libs.media3.datasource.cronet) {
|
|
exclude(group = "com.google.android.gms", module = "play-services-cronet")
|
|
}
|
|
"minimalImplementation"(libs.cronet.embedded)
|
|
|
|
implementation(platform(libs.compose.bom))
|
|
implementation(libs.compose.animation)
|
|
implementation(libs.compose.compiler)
|
|
implementation(libs.compose.foundation)
|
|
implementation(libs.compose.material)
|
|
implementation(libs.compose.material.icons.core)
|
|
implementation(libs.compose.material.icons.extended)
|
|
implementation(libs.compose.runtime)
|
|
implementation(libs.compose.ui)
|
|
implementation(libs.compose.uiTooling)
|
|
implementation(libs.activity.compose)
|
|
implementation(libs.navigation.compose)
|
|
implementation(libs.accompanist.systemuicontroller)
|
|
implementation(libs.accompanist.themeadapter.material)
|
|
|
|
implementation(libs.iconics.core)
|
|
implementation(libs.iconics.compose)
|
|
implementation(libs.community.material.typeface)
|
|
|
|
implementation(libs.bundles.paging)
|
|
|
|
implementation(libs.reorderable)
|
|
implementation(libs.changeLog)
|
|
|
|
implementation(libs.car.core)
|
|
"fullImplementation"(libs.car.projected)
|
|
}
|
|
|
|
// Disable to fix memory leak and be compatible with the configuration cache.
|
|
configure<GoogleServicesPluginConfig> {
|
|
disableVersionCheck = true
|
|
}
|